The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-19-2007
HAA HAA is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 24
add carriage return at end of file

Hi I would like to add carriage return at end of file,
because we need to mask the customer names for detailed records.

Some what the file doesnot have carriage at end of line of last record.So that i 'll get 2 records when use

---aa.txt-----
1|aaa|bbb|ccc
2|bbbb|hghgh|ggg
000002

tail -1 aa.txt

2|bbbb|hghgh|ggg
000002

how can i add carriage return at end of line?

Thanks for your advise in advance

Regards,
Haa