Review your favorite Linux distribution.
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, 08: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, 09:37 PM   #2
Senior Member
Registered: Jan 2010
Posts: 1,620

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451

try this
sed "s/'/\"/g" file
1 members found this post helpful.
Old 03-24-2011, 10: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 08:24 PM
search and replace string having multiple special characters say_hi_ravi Linux - Newbie 4 08-26-2009 08:43 AM
How do I replace special characters in a string within a bash script? rhaup0317 Linux - Newbie 2 06-03-2008 12:56 PM
Help w/ sed parsing special characters clem_c_rock General 8 08-31-2007 05:06 PM
using sed to insert lines with special characters disorderly Linux - Software 26 04-20-2006 06:30 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:27 PM.

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