[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: sed insert command
- From: Wayne Call <wcall edoceramic com>
- To: "'redhat-list redhat com'" <redhat-list redhat com>
- Subject: RE: sed insert command
- Date: Thu May 8 15:06:13 2003
I still get the same error.
The following command works:
sed -e "/this/i\\" -e "insert this line" junk.txt
But this inserts the line "insert this line" when it finds the word "this"
for any line in the file junk.txt. I need to insert a single line "insert
this line" at a specific line number in the file junk.txt.
-----Original Message-----
From: Edward Brookhouse [mailto:ebroo phillips com]
Sent: Thursday, May 08, 2003 12:46 PM
To: redhat-list redhat com
Subject: RE: sed insert command
Try sed -e 2i\somthing blah
-----Original Message-----
From: redhat-list-admin redhat com [mailto:redhat-list-admin redhat com]
On Behalf Of Wayne Call
Sent: Thursday, May 08, 2003 2:11 PM
To: 'redhat-list redhat com'
Subject: sed insert command
I'm attempting to insert a line into the junk.txt file using the
following sed command: sed -e '2i/insert this line/' junk.txt I get the
following error:
sed: -e expression #1, char 3: Extra characters after command I'm
obviously not using the correct syntax. How would I insert a line using
the sed command?
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request redhat com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request redhat com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]