Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Question - File Manipulate

Status
Not open for further replies.

aahan

Programmer
Mar 28, 2002
15
US
Would like to know a quick way to appending 2 characters before each and every line in a huge file. Looking for an efficient way to do it.

Thanks

 
sed s/^/01/g filename >filename.2

will do append 01 on begin of all lines in file "filename" and put output to filename.2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top