Ruby Developer – Essential Bash Commands, Ruby Edition
Ziemek wrote an amazing post about essential bash commands for Ruby developers over at his blog. I thought it would be fun to show some of the same commands, but using command line Ruby instead. I find using Ruby with the -ne flag easier to remember and easier to expand in to more complex scripts.
This is not a hammer vs screwdriver kind of argument… more of a composite handle hammer vs a wooden handle hammer. Without further ado, I’m going to show you how to use Ruby instead of the awk / grep / sed combo going example by example to transform each of Ziemek’s fantastic Bash examples in to Ruby ones.