Last Updated: May 15, 2019
·
979
· stuk

For quick scripts, Ruby is far better than bash

Just make liberal use of the ` (back tick) functionality

#!/usr/bin/env ruby

cool_files = `grep -l "cool" *`.split("\n")
exit_status = $?.exitstatus

stdout_and_stderr = `git fsck 2>&1`

http://www.ruby-doc.org/core-1.9.3/Kernel.html#method-i-60