what does
ruby -e "system 'which echo'"
tell you?
/Walther
> Den 8. mar. 2016 kl. 16.48 skrev Colin Law <clanlaw@gmail.com>:
>
> Can anyone explain this?
>
> If in a terminal I run echo -e 'hello' I see, as one would expect,
> $ echo -e 'hello'
> hello
>
> However if I execute the command using irb I see
> $ irb
> 2.1.3 :001 > system "echo -e 'hello'"
> -e hello
> => true
>
> It echoes the option which suggests to me that echo does not recognise -e
> If however I do
> 2.1.3 :003 > system "/bin/echo -e 'hello'"
> hello
> => true
>
> Which implies that when I do not specify the path it is using a
> different version of echo.
>
> I also see
> 2.1.3 :005 > system "which echo"
> /bin/echo
> => true
>
> But I am not sure that is relevant. Google has not helped me in this matter.
>
> This is using gnome-terminal in Ubuntu 16.04 (and 14.04)
>
> Any suggestions anyone?
>
> Colin
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuN%3DD%2Bgug1OkOATKeZgYbqXdYuq%2BCJArrFQPpDVriXt%3Dw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Denne besked er blevet skannet af ALCO Spamstop og menes at være fri for vira og spam.
>
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/B80F7F6A-EFE9-4A93-BB7D-7EC1395C980B%40diechmann.net.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment