bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with 'sed' command


From: Nehul Khatri
Subject: Problem with 'sed' command
Date: Tue, 10 Jul 2007 20:30:05 +0530

Hi,

I am using the sed command for a "search and replace" operation.

I am trying to replace a string with a '   like for example. I want to
replace Kitten' with Kitten". So the command i am using is

sed 's/Kitten'/Kitten"/g' cat.txt

but it throws and error saying

Unmatched '

So it takes the ' in the input (Kitten') to be the end of the the string and
the actual ' which signifies end of string is treated as Unmatched '

How can we actually search and replace a string with ' in it.

Thanks,
Nehul.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]