Save awk output as global variable 
Author Message
 Save awk output as global variable

I would like to save the output from awk as global variable instead of
print out.
How can I do that ?

Thank you in advance,

Y W Wong



Fri, 30 Mar 2001 03:00:00 GMT  
 Save awk output as global variable

Quote:
> I would like to save the output from awk as global variable instead
> of print out. How can I do that?

$ FOOBAR=`awk 'BEGIN { print "foobar"; exit }'`
$ echo $FOOBAR
foobar
$

Lots 'n' lots of assumptions here. But you didn't provide any useful
information with your inquiry, and the little information you did
provide has a bug (namely, your use of the term "global variable").

--
Jim Monty

Tempe, Arizona USA



Fri, 30 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Outputting info from awk and using the info to name the awk output file

2. Save a Global Variable programmatically

3. Saving changes to global variable

4. Global Variable save turns out to be **.gbl.vi

5. Global variable - change default value and save

6. Quoting Swamp: Saving an awk command in a shell variable

7. Naming the output file based on awk script variable

8. redirecting print output to variable name in awk

9. Class variables / global variables / Init variables

10. run awk output thru tee inside awk

11. Saved / Not saved variable?

12. Global Variable / Sessions / ASP Application type Variable

 

 
Powered by phpBB® Forum Software