Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 12-14-2007, 10:05 AM   #1
Registered: Mar 2007
Distribution: centos
Posts: 126

Rep: Reputation: 15
append the text at the end

What the need is simple that use the dirctive "sed" append a word at the end of each or signed lines but however i tried it always append in the next line no the end of the line ,i tried /i,/a but no can i do ?
Old 12-14-2007, 11:17 AM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If I undersatand your question correctly, this should work.
sed -e 's/$/Text to append to each line/' filename
--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash programming-append single line to end of file pheasand Linux - General 4 02-28-2014 09:41 AM
Append string to end of file name chellemybelle Linux - Newbie 4 11-26-2007 07:17 PM
Append variable string(s) at end of each line schaganti Linux - Newbie 2 10-19-2007 01:31 PM
bash: append string to end of line khairil Programming 6 02-27-2007 05:09 AM
batch append string to the end of a determined line in text files osio Programming 6 06-30-2005 09:28 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration