Inserting Text In Specific Location Using Shell Script

Cesar Covarrubias cesar at uci.edu
Fri May 26 19:51:22 UTC 2006


Hello,

I am running a script on about 30 machines and need to insert text after
a specific comment. For example:

#comment 1

#comment 2

#comment 3

I want to add text after #comment 2, on a new line. I have been trying
to work with both sed and awk but no success. This has to be done in
bash or sh and cannot be done in any other language. Any ideas?
-- 
Very Respectfully,
Cesar Covarrubias
cesar at uci.edu




More information about the redhat-list mailing list