ruby -pi -w -e 'gsub!(/search/, "replace")' *.rb
Use it to seach through your ruby script files doing a global search
and replace. Be careful though. Make a mistake using it and you'll be
wanting a backup!
T.
Hence, specifying a backup extension is a good idea:
ruby -wpi.bak -e '...' xfiles
Now xfiles will first be backed up as xfiles.bak
andrew
Bangless, with backup:
ruby -i.bak -pe 'gsub(/search/, "replace")' *.rb