From: "Peña, Botp" Date: 2008-12-04T12:42:53+09:00 Subject: Re: rescuing a failed %x[] call? From: Kyle Schmitt [mailto:kyleaschmitt@gmail.com] # I know it should be streightforward, but I'm not finding the # docs anywhere... what is kernel#system? botp@botp-desktop:~$ qri kernel#system ------------------------------------------------ Kernel#system system(cmd [, arg, ...]) => true or false ------------------------------------------------- Executes cmd in a subshell, returning true if the command was found and ran successfully, false otherwise. An error status is available in $?. The arguments are processed in the same way as for Kernel::exec. system("echo *") system("echo", "*") # How does one go about rescuing a failed shell command? # like in the instance it fails, or the command isn't found? basically, you'll just have to ask it, like rescue_command_here unless system(my_shell_command) lastly, you'll have to test it (because i just type this answers on my inbox w/o testing :)