The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #13 (permalink)  
Old 01-28-2007
radoulov's Avatar
radoulov radoulov is offline
addict
 

Join Date: Jan 2007
Location: Milan, Italy/Varna, Bulgaria
Posts: 1,516
Quote:
Originally Posted by fredao
patt is a shell variable or gawk variable?
[...]
patt is a shell variable here:

Code:
patt="$(printf "id=\"%s\"|" $(<file2))"
... and becomes an awk variable here:

Code:
awk '$0 ~ patt{print $0RS}' RS="</object>" patt="${patt%|}" file1
Reply With Quote