Scripting help please 2005-05-05 - By Ed Wilts
Back On Wed, May 04, 2005 at 09:52:53PM -0700, Will Yardley wrote: > On Wed, May 04, 2005 at 09:59:08AM -0500, Ed Wilts wrote: > > > > replace ', ' '* ' -- $filename > > > > replace can process multiple files at once and does the changes in > > place. > > How is this any better than "sed -i", e.g., > sed -i 's/, /* /g' filename
replace starts to pay for itself when you need to process multiple files or if you want to swap character strings. For example, replace a b b a -- *htm will swap the strings a and b around in all the files.
For simplicity, I think replace wins. For overall power, sed wins. That's one of the nice things about Linux - we have a wide variety of tools at our disposal that may be capable of doing the job.
-- Ed Wilts, RHCE Mounds View, MN, USA mailto:ewilts@(protected) Member #1, Red Hat Community Ambassador Program
-- Taroon-list mailing list Taroon-list@(protected) http://www.redhat.com/mailman/listinfo/taroon-list
Earn $52 per hosting referral at Lunarpages.
|
|