Sample Header Ad - 728x90

Using `pidof` with `sh -c`

2 votes
1 answer
2173 views
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