View Single Post
  #1   (View Single Post)  
Old 6th November 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default How to append text to second line of a file

Say for example I have a text file like:

Code:
1
3
4
How would I append "2" to the second line of this file from the command line? (ksh here) I tried using some combinations of head/tail but I'm not very good
Reply With Quote