Inserting Text In Specific Location Using Shell Script
- From: Cesar Covarrubias <cesar@xxxxxxx>
- Date: Fri, 26 May 2006 12:51:22 -0700
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@xxxxxxx
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- Follow-Ups:
- Re: Inserting Text In Specific Location Using Shell Script
- From: Wayne Betts
- RE: Inserting Text In Specific Location Using Shell Script
- From: Michael Velez
- Re: Inserting Text In Specific Location Using Shell Script
- From: Bill Medland
- Re: Inserting Text In Specific Location Using Shell Script
- Prev by Date: RE: redhat-list Digest, Vol 27, Issue 26
- Next by Date: Re: Inserting Text In Specific Location Using Shell Script
- Previous by thread: RE: redhat-list Digest, Vol 27, Issue 26
- Next by thread: Re: Inserting Text In Specific Location Using Shell Script
- Index(es):
Relevant Pages
- Re: Inserting Text In Specific Location Using Shell Script
... Cesar Covarrubias wrote: ... I am running a script on about 30 machines
and need to insert text after ... Some prerequisites: ... (RedHat) - Re: Inserting Text In Specific Location Using Shell Script
... there are two ways that come to my mind to do this. ... I am running a script
on about 30 machines and need to insert text after ... Cesar Covarrubias ...
(RedHat) - Re: New Cobol compiler written in Cobol
... machines at the time were the IBM 7090 and similar 7040. ... the 14xx line had
grown to become the dominant business computer. ... Programmers won't put up with
cryptic languages like C++ ... They'll use a language they can understand at a glance.
... (comp.lang.cobol) - Re: What does the future of computing hold?
... sophisticated views about boiling language down or not. ... deterministic
physical machines, or do you follow Turing and think, ... We may have metaphysical souls,
but the fact that computers are lousy at ... For ethical reasons, you cannot grow human
babies to ... (comp.programming) - Re: Automating password change
... All the machines are set up differently from each other ... > use telnet,
others I can rlogin or remsh, and still others I can ssh. ... it would not be practical
to try to write a complex script ... > to write a simple script to wrap around passwd
that would run on each ... (comp.unix.solaris)