LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-05-2006, 03:17 AM   #1
Hydrap
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Rep: Reputation: 0
Sed Problem


I have a file contain a line:

"John","",""1234""

and want to change this line become

"John","","1234"

How can I use Sed to achieve this?
 
Old 05-05-2006, 03:25 AM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
try sed -e 's/""/"/g' -e 's/,",/,"",/g'
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sed problem twintornado Programming 2 06-02-2005 08:25 AM
a sed problem thanhVic Programming 5 03-02-2005 01:05 AM
sed problem Warmduvet Programming 2 09-15-2004 06:33 PM
Help Sed Problem anirudh Linux User Groups (LUG) 1 08-30-2004 02:25 PM
Insert character into a line with sed? & variables in sed? jago25_98 Programming 5 03-11-2004 06:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration