Sed - insert character between tag
Bruno Galindro da Costa
bruno.galindro at gmail.com
Wed Dec 16 15:42:41 UTC 2009
Work´s perfectly Florian! Thank you very much!
Thank you too Jozsef!
2009/12/15 Florian Diesch <diesch at spamfence.net>
> Bruno Galindro da Costa <bruno.galindro at gmail.com> writes:
>
> > Hi all!
> >
> > I have a text file with this content:
> >
> > VAR_1="xyz "abcd" fgh"
> >
> > Using sed, how can I insert a backslash before the two quotes between the
> > first and last quote?
> >
> > e.g.: VAR_1="xyz \"abcd\" fgh"
>
> sed -r 's/"/\\"/g;s/\\"/"/;s/(.*)\\"/\1"/'
>
> Maybe there's something more elegant...
>
>
> Florian
> --
> <http://www.florian-diesch.de/software/shell-scripts/>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
--
Att.
Bruno Galindro da Costa
bruno.galindro at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20091216/4b8df75b/attachment.html>
More information about the ubuntu-users
mailing list