FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-15-2009, 07:22 PM
Bruno Galindro da Costa
 
Default Sed - insert character between tag

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"

--
Att.
Bruno Galindro da Costa
bruno.galindro@gmail.com

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-15-2009, 07:33 PM
Jozsef
 
Default Sed - insert character between tag

On Tue, 2009-12-15 at 18:22 -0200, Bruno Galindro da Costa wrote:
> 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"
>
> --
> Att.
> Bruno Galindro da Costa
> bruno.galindro@gmail.com


maybe try this:
perl -p -i -e 's/"abcd"/"abcd"/g' *.txt

--
Best,
Jozsef Kurucity | Web & Graphic Designer
+971 50 6783113 | jzfk9@aol.com


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 07:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org