The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Replacing the last data of each line ina file jisha Shell Programming and Scripting 6 08-04-2008 04:47 AM
Replacing a line in a file - HELP!!! maxmave Shell Programming and Scripting 1 06-04-2008 08:55 PM
replacing a line of unknown charecters in a file malavm Shell Programming and Scripting 12 07-26-2007 01:25 AM
replacing first line or lines in a file Terrible UNIX for Advanced & Expert Users 3 06-28-2006 05:23 PM
replacing the character "\" in a file rjsha1 Shell Programming and Scripting 5 01-11-2006 06:45 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-17-2008
Registered User
 

Join Date: May 2008
Posts: 18
Question Replacing end of line with " in a UNIX file

How should I replace End of line Character by ".
i.e in a file -
Name1,NO1
Name2,No2
Name3,No3
....

Should look like --
Name1,NO1"
Name2,No2"
Name3,No3"
....
Reply With Quote
Forum Sponsor
  #2  
Old 05-17-2008
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 791
Code:
sed -e 's/$/"/' filename > newfile
Reply With Quote
  #3  
Old 05-17-2008
Registered User
 

Join Date: May 2008
Posts: 18
Thanks Yogesh. It worked fine.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
sed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0