Hello Group, Is there any way to retrieve an exit code of shell commands when called from ruby? ruby code : exec("ls") if fork.nil? Process.wait shell : # ls # echo $? <-- get this value in ruby -- Posted via http://www.ruby-forum.com/.