13

awk read RS

view full story
linux-howto

http://www.unix.com – I need to know if there is a way to use the while read command from a awk record. The record has 3 or 4 lines and I need the line to be all of the record instead of just each line of it. Code: nawk 'BEGIN {RS="!"} /atm pvc/ {print $0}' router.list | while read line do VP=`echo "$line" | egrep "atm pvc" | nawk '{print $4}'` VC=`echo "$line" | egrep "atm pvc" | nawk '{print $5}'` PROFILE=`echo "$line" | egrep "atm pvc" | nawk '{print $7}'` ENACP=`echo "$line" | egrep "encapsulation"` INTERFACE=`echo &q (HowTos)