I was researching something else and thought this was a cool way to execute a command through the open method in ruby:
1
|
The key is starting the open with pipe. For example,
1
|
Or to exec and print the result in one line:
1
|
Not sure where I saw it originally, but this is an interesting older read: https://devver.wordpress.com/2009/06/30/a-dozen-or-so-ways-to-start-sub-processes-in-ruby-part-1/