I'm writing a ruby script and found this strange behaviour.
Using ruby 2.4.2 [x86_64-darwin16]
Basically I'm trying to echo two separated messages and in my index.rb
file I got:
exec("echo 'teste'")
exec("echo 'teste2'")
But when I run ruby ./index.rb
The output is:
teste
Why that's happening?
Shouldn't this be the output?
testeteste2