Hi, Cheyne Li wrote: > Hi,there > > If I have file and has a line is "aaa=100", and need to replace it as > "aaa=4". > Is there a way to do it without iterating each line and find the match, > then replace it? Thank in advance ruby -i -pe'gsub(/aaa=100/,"aaa=4")' somefile Regards, Park Heesob -- Posted via http://www.ruby-forum.com/.