![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| global variable not being set | robotball | Shell Programming and Scripting | 5 | 06-10-2008 07:20 AM |
| setting a global variable in script | arunkumar_mca | UNIX for Dummies Questions & Answers | 3 | 10-23-2007 08:46 AM |
| Global Variable in a script? | skyineyes | Shell Programming and Scripting | 2 | 07-12-2007 07:55 AM |
| Global Variable in awk... | ZINGARO | Shell Programming and Scripting | 1 | 07-04-2007 02:07 PM |
| Global variable becomes local | odashe318 | Shell Programming and Scripting | 2 | 10-29-2004 10:18 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
global variable in awk
I wrote a awk script file and define some global variables after BEGIN option:
BEGIN { cell = ""; alarm = "";} when i run the command: awk -f awk_script inputfile The results are as expected. But when I put awk script into a shell script. Global variables couldn't be understand. I don't want to use the formatting: awk -v cell=123 awk_script inputfile . Because the global variables can't be changed many times before finishing awk_script ( with -v option: golbal variables're alway fixed). Who can solve this for us? Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|