passw awk variable to shell script
- From: Dave Markham <dave.markham@xxxxxxxxxx>
- Date: Tue, 31 Oct 2006 14:45:37 +0000
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@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Prev by Date: running php in Apache
- Next by Date: Urgent PasswordLess SSH problem.
- Previous by thread: running php in Apache
- Next by thread: Urgent PasswordLess SSH problem.
- Index(es):
Relevant Pages
|