The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
The Perl Ruby That Saved Me

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Trans Onoma

Posts: 63
Nickname: transfire
Registered: Aug, 2005

Trans Onoma has programming for too long.
The Perl Ruby That Saved Me Posted: Mar 28, 2006 6:12 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Trans Onoma.
Original Post: The Perl Ruby That Saved Me
Feed Title: TRANSONOMA
Feed URL: http://feeds.feedburner.com/transonoma
Feed Description: A Light Green Agile Programming and SciTech Blog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Trans Onoma
Latest Posts From TRANSONOMA

Advertisement
This one-liner has saved me more time than I care to consider.

perl -pi -w -e 's/search/replace/g;' *.rb
ruby -pi -w -e 'gsub!(/search/, "replace")' *.rb

It will search and replace one string for another across multiple files. You can read about it here.

Read: The Perl Ruby That Saved Me

Topic: More on Business DSLs in Ruby Previous Topic   Next Topic Topic: The module no one wants to rewrite

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use