Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-24-2011, 07:44 PM   #1
LQ Newbie
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Using sed to replace special characters in a file

I have a file with special characters that need to be replaced. Any help would be appreciated. I've been working on this for a day and have run out of time.


Need to replace the ' with a " on all lines in the file.

Old 03-24-2011, 08:37 PM   #2
Senior Member
Registered: Jan 2010
Posts: 1,606

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448

try this
sed "s/'/\"/g" file
1 members found this post helpful.
Old 03-24-2011, 09:47 PM   #3
LQ Newbie
Registered: Mar 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Worked perfectly.
Thank you so much for your help.


replacement, sed

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] replace new line with <br /> & escape special characters ted_chou12 Linux - Newbie 5 02-07-2011 07:24 PM
search and replace string having multiple special characters say_hi_ravi Linux - Newbie 4 08-26-2009 07:43 AM
How do I replace special characters in a string within a bash script? rhaup0317 Linux - Newbie 2 06-03-2008 11:56 AM
Help w/ sed parsing special characters clem_c_rock General 8 08-31-2007 04:06 PM
using sed to insert lines with special characters disorderly Linux - Software 26 04-20-2006 05:30 PM

All times are GMT -5. The time now is 08:32 AM.

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