0

I have some bash shell script code

#!/bin/bash
var=""
something happens here
var=$!

I could't find anyting about it and I'm not sure if it makes any sense but if so - what does it mean?

Thanks.

EDIT: Wow - looks like I didn't search deep enough - the answer lies hier What are the special dollar sign shell variables?

Community
  • 1
  • 1
Faulek
  • 47
  • 1
  • 6
  • Read this http://unix.stackexchange.com/questions/3747/understanding-the-exclamation-mark-in-bash – dmitryro Jul 07 '16 at 20:49
  • Thx. I even found this https://www.gnu.org/software/bash/manual/html_node/Special-Parameters.html and I'm not sure why I didn't found it in the first place. Oh boy. – Faulek Jul 07 '16 at 20:53

1 Answers1

0

$! resolves to the process id of the latest process run in the background.

Juan Tomas
  • 4,905
  • 3
  • 14
  • 19