Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert a new line with text using sed

Status
Not open for further replies.

dsm325

Technical User
Apr 4, 2001
29
0
0
US
I have several hundered files with the exact same format, and I need to add a line below another line that starts with
SENDID.
My new line will have RESOURCE=10030

I tried playing with i ((insert) and I am not coming up with anything.

Please assist, thanks much
 
i'm editing a file.
vi file.txt
I'm trying to over wright text. how do i do this. I'm not inserting text.

thanks so much
 
man vi (the R command)

Hope This Help
PH.
 
If you are replacing an unknown quantity of text, such as a whole paragraph, the R command is very appropriate.
However, if you're replacing a small quantity of text, a word, 3 letters, etc, there are other commands that will help your editing more precise.
r replaces one single character by another
s replaces one character by an indefinite number of char.
cw replaces one word, etc.
If you have a particular requirement, let us know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top