LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using sed to replace special characters in a file (http://www.linuxquestions.org/questions/linux-software-2/using-sed-to-replace-special-characters-in-a-file-870835/)

wskibum 03-24-2011 08:44 PM

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.

Example:
FILE='/var/tmp/S0000000.LOG.March-24-2011:10:51.tar'

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

Thanks

crts 03-24-2011 09:37 PM

Hi,

try this
Code:

sed "s/'/\"/g" file

wskibum 03-24-2011 10:47 PM

Worked perfectly.
Thank you so much for your help.


All times are GMT -5. The time now is 01:17 AM.