News for hackers. Stuff that matters.
Re:Useful command-line scripts for web developers (or anyone... by sunkencity on Friday June 05, 2009 @09:27AM (#643137)
I find it very much easier to just enter irb or run ruby with -e and hack around with backquoted strings instead of using bash to loop through and manipulate filenames.

a silly usecase would be reversing all the file names:

ruby -e '`ls -1`.each_line { |x| `mv #{x.chomp} #{x.chomp.reverse}` }'

pbcopy is pretty cool feature though.

Re:Useful command-line scripts for web developers (or anyone... by emson on Friday June 05, 2009 @09:56AM (#643178)
Yes I like the idea of using Ruby I find it a little more intuitive. Thanks.

Also you may want to look at commandlinefu.com: http://www.commandlinefu.com/commands/tagged/34/bash

Re:Useful command-line scripts for web developers (or anyone... by Xichekolas on Friday June 05, 2009 @10:21AM (#643221)
Also fun as far as ruby on the command line goes: Rush http://rush.heroku.com/