2 votes 2 votes Which of the following commands would return process_id of sleep command? Sleep 1 and echo $ Sleep 1 and echo $# Sleep 1 and echo $* Sleep 1 and echo $! Operating System ugcnetcse-dec2013-paper3 operating-system non-gate unix + – go_editor asked Jul 29, 2016 edited Jan 29 by Arjun go_editor 2.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes $$ PID of current shell echo "my PID = $$" $! PID of last background command ls & echo "PID of ls = $!" $? exit status of last command ls ; echo "ls returned code $?" $0 Name of current command (as called) echo "I am $0" $1 Name of current command's first parameter echo "My first argument is $1" $9 Name of current command's ninth parameter echo "My ninth argument is $9" $@ All of current command's parameters (preserving white space and quoting) echo "My arguments are $@" $* All of current command's parameters (not preserving white space and quoting) So answer will be D sh!va answered Mar 9, 2017 sh!va comment Share Follow See all 0 reply Please log in or register to add a comment.