CMC
Company
Programming
Technical
Which of the following shell variable is used to return the process ID of the current shell?
A) $!
B) $$
C) $*
D) None
Read Solution (Total 3)
-
- $$ the process number of this shell - useful for
including in filenames, to make them unique.
$! the process id of the last command run in
the background.
$* a string containing all the arguments to the
shell, starting at $1.
SO ans (A) None - 9 years agoHelpfull: Yes(3) No(2)
- option B : $$
- 9 years agoHelpfull: Yes(1) No(0)
- $$ returns pid
- 7 years agoHelpfull: Yes(0) No(0)
CMC Other Question