Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

use ruby | 21 comments | Create New Account
Click here to return to the 'use ruby' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
use ruby
Authored by: ngb on Jul 14, '04 06:01:28PM

alias rubyrename='ruby -e "a = ARGV.shift; b = ARGV.shift; ARGV.each{ |f| File.rename(f, f.gsub(a, b)) }"'
use as follows

rubyrename oldstring newstring filelist
alternatively, you could just hardcode values for a and b

[ Reply to This | # ]