From: Dave Markham (dave.markham@fjserv.net)
Date: Tue Oct 31 2006 - 09:45:37 EST
Sorry guys not specifically solaris related but i cant find any info
ANYwhere about this.
I want to set a shell variable in a script but with awk.
I can find so many pages about setting awk variables with shell variables
e.g
BasePatch=115275-12
EPatchRev=`nawk '/^Patch: '"$BasePatch"'/ {print $2}'
BUT i want to set a shell variable with the $2 or $1 from an awk print
statement.
I have tried this which i saw somewhere but it doesnt work.
echo $line | awk -F- '{ system( "BasePatch=" $1 ) ; system( "Rev=" $2 )}'
Im wanting to set vairable BasePatch and Rev in the shell script in one
awk line.
Thanks
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:41:07 EDT