bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with sed


From: Radim
Subject: Re: Help with sed
Date: Fri, 16 Apr 2010 01:31:06 -0700 (PDT)



Radim wrote:
> 
> What I try to do:
> 1) To delete the codecs function of the output.
> 2) To get the "if mandriva" block
> 3) from that block to get lines of urpmi
> 
> Anybody help?
> 

Or better this:

content=$(cat $script | sed '/function codecs/,/fi;/d;/function*\}/p'); #
get functions that don't match 'codecs' ... this doesn't work because it
shows 1st line only
echo $content;
# and the next part:
content=$(echo $content | sed -n '/mandriva/,/fi;}/p');
content=$(echo $content | sed -n '/^\s*urpmi[:space:]--auto/p');


-- 
View this message in context: 
http://old.nabble.com/Help-with-sed-tp28264280p28264345.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]