contents of a.rb
is :
if system("mount | grep /boot") != ""
print "true" # or do something
else
print "false" # or do something else
end
Running this code doesn't print "true" or "false", but prints the output of system call.
]$ ruby a.rb
/dev/sda1 on /boot type ext4 (rw)
What's the right syntax to check the if condition ?