Sed programming question
Dan Thurman
dant at cdkkt.com
Thu Dec 11 21:58:55 UTC 2008
Gordon Messmer wrote:
> Dan Thurman wrote:
>> I tested your suggestion above with and without -r option
>> but could not make it work as an "AND operator":
>>
>> # echo "foo har" | sed -re '/foo/{/bar/{s/foo/goo/}}'
>> goo har
>
> $ rpm -q sed
> sed-4.1.5-11.fc10.x86_64
>
> $ echo "foo har" | sed -re '/foo/{/bar/{s/foo/goo/}}'
> foo har
>
$ rpm -q sed
sed-4.1.5-10.fc9.i386
Hmm... I tried it again and it worked...
Must be a brain-f*rt on my part!
Thanks a lot for confirming!
Dan
More information about the fedora-list
mailing list