{"id":3353,"date":"2014-07-18T12:51:05","date_gmt":"2014-07-18T04:51:05","guid":{"rendered":"http:\/\/rmohan.com\/?p=3353"},"modified":"2014-07-18T12:51:05","modified_gmt":"2014-07-18T04:51:05","slug":"bash-default-variables-for-a-bash-shell","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3353","title":{"rendered":"BASH \u2013 Default variables for a bash shell"},"content":{"rendered":"<p>$?    =>  Return code of previous command<br \/>\n$0    =>  Name of the script itself<br \/>\n$1-9  =>  Argument number 1 to 9 given to script<br \/>\n${10} => Argument number 10 given to script<br \/>\n$#    => Total number of arguments given to script<br \/>\n$@    => All arguments given to script but as an individual string values<br \/>\n&#8220;$*&#8221;  => All arguments given to script as a single string value (must be in double quotes)<br \/>\n$$    => Process id of the script<br \/>\n$!    => Process id of last job run in backgroup<br \/>\n$_    => Last argument given to previous command<\/p>\n","protected":false},"excerpt":{"rendered":"<p>$? => Return code of previous command $0 => Name of the script itself $1-9 => Argument number 1 to 9 given to script ${10} => Argument number 10 given to script $# => Total number of arguments given to script $@ => All arguments given to script but as an individual string values &#8220;$*&#8221; [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3353"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3353"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3353\/revisions"}],"predecessor-version":[{"id":3354,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3353\/revisions\/3354"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}