[Techtalk] Escaping single quotes in a file with a bash script

Gretchen Dziengel gdziengel at gmail.com
Wed Jul 11 18:58:58 UTC 2007


On 7/11/07, Gretchen Dziengel <gdziengel at gmail.com> wrote:
>
> On 7/11/07, Kathryn Hogg <kjh at flyballdogs.com> wrote:
>
> >
> > Use double quotes for the outer level:
> >
> > sed -e "s/'/\\\'/" infile outfile
>
>
>
> That makes perfect sense, but it's still not working for me.
> sed -e "s/\'/\\\'/" step24.txt > step25.txt
>

Shoot!
I have an extra backslash in mine.  It works great now.  Sorry!


More information about the Techtalk mailing list