On 6 March 2010 13:23, Rick Welykochy <[email protected]> wrote: > Try this: > > #/bin/bash > > cp "$2" TestResult > > export IFS=',' > cat Mapping/$1-Mapping | while read replace search > do > perl -i -p -e "s/\Q$search/$replace/g" TestResult > done
12 points for this answer :). That's the proper way to do it. One thing that makes me cringe a bit whenever I see it is "cat single-file |", replace it with an input redirection: while read replace search < Mapping/$1-Mapping ... --Amos -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
