The script is already solved on other forum.

awk 'BEGIN{RS="\n}";FS="if"}
!/function codecs/{
   for(i=1;i<=NF;i++){
      if($i~/mandriva/){
        m=split($i,u,"\n")
        for(j=2;j<=m;j++) if(u[j]~/urpmi/){print "-->"u[j]}
      }
   }
}' file
-- 
View this message in context: 
http://old.nabble.com/Help-with-sed-tp28264280p28279013.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.



Reply via email to