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!

Append character to each line in a file 1

Status
Not open for further replies.

lambic

Technical User
Nov 28, 2002
68
GB
Hi,

I have a file containing approx 4500 records & I want to append a character (the same character) at the end of each record. The records can vary in length, and look something like this:

06010230404503 784682874002
074802830467 793526492830
0547349477923B 76203129124B
012632847392 708963462938
0125572393029B 79051289329B

Would I use something like sed to do this?

Many Thanks
 
A starting point:
sed 's!$!X!' /path/to/input > output

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks very much PH - that did the trick.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top