[GLLUG] Appending text via shell script

Andy Lee ALEE at courts.mi.gov
Wed Jun 22 16:14:02 EDT 2005


You can use >> to append something to the end of a file. If you are just reading some files, and selecting lines from them, and adding them to another file as you find them, that's probably the easiest. If you need to be more selective there might be more flexible options.

>>> Mike Szumlinski <szumlins at mac.com> 06/22/05 03:59PM >>>
I'm starting to make packages for installs here at work and from time  
to time I need to append text to a preference file rather than write  
over it.  It does have to be called through a shell script (part of  
the requirements of an OS X .pkg file).  I'm new to command line text  
manipulation and I'm not quite sure what tool/tools are going to work  
best for me.  Basically I'll want to search various plist files (XML)  
and append lines/delete lines from them from a shell script.  Anyone  
have a good idea what direction to point me in?

-Mike
_______________________________________________
linux-user mailing list
linux-user at egr.msu.edu 
http://www.egr.msu.edu/mailman/listinfo/linux-user




More information about the linux-user mailing list