I was wondering why this command line does not print
pidof sh
:
$ sh -c "var=pidof sh
; echo \$var; ps -H"
This one prints 123
as expected
$ sh -c "var=123 ; echo \$var; ps -H"
I am on Ubuntu Linux.
Asked by Ankur Agarwal
(3268 rep)
Aug 27, 2011, 11:11 PM
Last activity: Oct 25, 2014, 03:21 AM
Last activity: Oct 25, 2014, 03:21 AM