Ruby - Execute external command (system) - failure



examples/other/system_failure.rb
res = system("ls -l abc")
puts "\n"
puts res

examples/other/system_bad.rb
res = system("blabla")
puts "\n"
if res.nil?
  puts "res is nil"
end