3 ms·
For anything more complex than linear shell scripting, I prefer ruby --disable-gems these days. As you say, Python is horrible for composing and executing shell
by tremon 2mo ago
For anything more complex than linear shell scripting, I prefer ruby --disable-gems these days. As you say, Python is horrible for composing and executing shell commands, but Ruby's FileUtils#sh (combined with %W{} array literals, %x{} output capturing and regular #{} string interpolation) provides a pretty low-impedance interface.
- zbentley 2mo agoFileUtils#sh doesn't exist: ruby --disable-gems -e 'require "FileUtils"; FileUtils::sh("ls")' -e:1:in `<main>': undefined method `sh' for FileUtils:Module (NoMethodError)