DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text to speech (save to file) - text2wave broken godfrank FreeBSD Ports and Packages 2 23rd May 2010 02:13 AM
Text screwed in Qt4 line edits (etc) TerryP FreeBSD Ports and Packages 0 12th November 2009 04:01 AM
avidemux2 command line roddierod FreeBSD General 1 10th November 2008 08:27 PM
shell: how to take part of the line... graudeejs Programming 8 6th September 2008 11:13 PM
TCSH - getting to start of line maxrussell FreeBSD General 3 4th July 2008 11:55 AM


All times are GMT. The time now is 09:07 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick