The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 07:47 AM
Replacing a line in a file - HELP!!! maxmave Shell Programming and Scripting 1 06-04-2008 11:55 PM
replacing a line of unknown charecters in a file malavm Shell Programming and Scripting 12 07-26-2007 04:25 AM
replacing first line or lines in a file Terrible UNIX for Advanced & Expert Users 3 06-28-2006 08:23 PM
replacing the character "\" in a file rjsha1 Shell Programming and Scripting 5 01-11-2006 09:45 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-17-2008
The Observer The Observer is offline
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"
....
  #2 (permalink)  
Old 05-17-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
Code:
sed -e 's/$/"/' filename > newfile
  #3 (permalink)  
Old 05-17-2008
The Observer The Observer is offline
Registered User
  
 

Join Date: May 2008
Posts: 18
Thanks Yogesh. It worked fine.
Sponsored Links
Closed Thread

Bookmarks

Tags
sed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0