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!

sed command

Status
Not open for further replies.

masalachol

Technical User
Apr 8, 2004
20
US
I have a file where I have to remove the commas that are between quotation marks and then replace the quatation marks with a pipe |. ie

so far I have sed 's/\("*[,]*"\)/\|/g' and this replaces the quotation marks with a | but I feel I am going about it the wrong way. Any suggestions?

file
"Hello, World"
"Hello World,"
"Hel, lo World"

result

|Hello World|
|Hello World|
|Hello World|

Regards,
Milenko
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top