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 > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-22-2008, 08:22 AM
Guillaume
 
Default sed script problem

hi,

I hope that someone could answer my question

I experience a problem with sed. If i run this sed in 'interactive'
command line with this command line :

sed -i -e '/%B5content%5D/d' file.tx
Note that I use special char in the deleted part I search for.
if I run the same in a script, the command does not delete any
correspondant existing string.

do you know why ?

Thanks,

--
Guillaume

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-22-2008, 01:13 PM
Patrick Kaiser
 
Default sed script problem

On Fri, Aug 22, 2008 at 10:22:33AM +0200, Guillaume wrote:
> hi,
>
> I hope that someone could answer my question
>
> I experience a problem with sed. If i run this sed in 'interactive'
> command line with this command line :
>
> sed -i -e '/%B5content%5D/d' file.tx
> Note that I use special char in the deleted part I search for.
> if I run the same in a script, the command does not delete any
> correspondant existing string.
>
> do you know why ?
>
> Thanks,
>
> --
> Guillaume
>
> --
> fedora-list mailing list
> fedora-list@redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>

Dear Guillaume,

can you post the script or attach it?
maybe you have to double escape special characters?

regards,
patrick

--

Patrick Kaiser

URL: http://argonius.de
EMail: patrick.kaiser@argonius.de
RIPE: PK3264-RIPE

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-22-2008, 01:37 PM
Kevin Martin
 
Default sed script problem

Guillaume wrote:

hi,

I hope that someone could answer my question

I experience a problem with sed. If i run this sed in 'interactive'
command line with this command line :

sed -i -e '/%B5content%5D/d' file.tx
Note that I use special char in the deleted part I search for.
if I run the same in a script, the command does not delete any
correspondant existing string.

do you know why ?

Thanks,


When you run it in a script is it as the same user with the same shell?
Is the script picking up your environment?


Kevin

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-22-2008, 01:43 PM
Guillaume
 
Default sed script problem

> When you run it in a script is it as the same user with the same shell?
yes, same user and same shell (/bin/bash)
I forgot to mention the #!/bin/bash in the header.

> Is the script picking up your environment?
Yes, I tought, i did not explicit any new environement var.

--
Guillaume

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-22-2008, 02:00 PM
Guillaume
 
Default sed script problem

2008/8/22 Patrick Kaiser <patrick@argonius.de>:
> On Fri, Aug 22, 2008 at 03:32:47PM +0200, Guillaume wrote:
>> 2008/8/22 Patrick Kaiser <patrick@argonius.de>:
>>
>> > can you post the script or attach it?
>> > maybe you have to double escape special characters?

Ok, youre right, i just have to add simple quote to $filename var. I
was sure i do that before but.... Not !
thanks for your help !



>> sed -e '/$filename/d' ./$LINK_LIST
sed -e '/'$filename'/d' ./$LINK_LIST



--
Guillaume

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 10:24 AM.

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