View Single Post
  #5   (View Single Post)  
Old 7th November 2010
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

sed is my choice for stuff like this:

Code:
rocket357@SkyNet:~$ cat test.txt
1
3
4

rocket357@SkyNet:~$ sed 2's/\(.*\)/\1 <additional text>/' test.txt
1
3 <additional text>
4
but that's just me. I like sed and use it perhaps too much.
Reply With Quote