Computing.Net > Forums > Unix > Inserting a string at the end of a

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Inserting a string at the end of a

Reply to Message Icon

Name: lamos
Date: April 30, 2004 at 07:09:16 Pacific
OS: Solaris 8
CPU/Ram: 1GB
Comment:

Hi folks,

Using sed and/or awk, how would I insert a text string (from a korn script) after a string that's at the end of a file.

I'm having trouble creating a newline and inserting the text string after the line in a shell script.

Thx



Sponsored Link
Ads by Google

Response Number 1
Name: thepubba
Date: April 30, 2004 at 10:10:14 Pacific
Reply:

Why do you have to use sed or awk? You said it needs to be appended to the end of the file. Why not just use:

print "<string value>" >> <filename>


0

Response Number 2
Name: lamos
Date: April 30, 2004 at 21:32:46 Pacific
Reply:

Jerry,

You're absolutely correct. The print statement is to the point.

Thanx


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Inserting a string at the end of a

Insert Date at the end of everyLine www.computing.net/answers/unix/insert-date-at-the-end-of-everyline/7547.html

How to get rid of a "," at the end of a variable read www.computing.net/answers/unix/how-to-get-rid-of-a-at-the-end-of-a-variable-read/1186.html

to append the end of a line www.computing.net/answers/unix/to-append-the-end-of-a-line/6100.html