A little too "off the cuff":

perl -p -i.bak -e 's/^(.*text-you-are-searching-for.*)$/${1}text-to-append/;' name-of-file-to-modify.txt

Also untested...

>>> troy.johnson at health.state.mn.us 04/15/02 11:54AM >>>
Off the cuff:
perl -p -i.bak -e 's/^(.*text-you-are-searching-for.*)$/${1}text-to-append/;'
>>> amy at real-time.com 04/15/02 11:39AM >>>
What's the simplest way to do the following in perl:
Take as input a file.  Search for a line containing a particular string.
Then append to that line.


_______________________________________________
Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org 
tclug-list at mn-linux.org 
https://mailman.mn-linux.org/mailman/listinfo/tclug-list