Kamis, 16 Februari 2012

How to change string in multiple files in UNIX

sed -i 's/named_scope/scope/g' *.rb

where is
"named_scope" the string that you want to replace
"scope" the new string.
 
Copyright 2009 ruby on rails. Powered by Blogger
Blogger Templates created by Deluxe Templates
Wordpress by Wpthemescreator