passing arguments from awk to another script 
Author Message
 passing arguments from awk to another script

Quote:

> let awk call the subscript.  The following is untested code, so you must
> test it:

> awk '
>     { line[NR]=$1}
>     END {
>         for (i=1;i<=NR;i++) {
>             cmd = "subscript " line[i]
>             system(cmd)
>         }
>     }
>  ' testfile

Thanks for the script!  But, unfortunately, it doesn't work . What
could be the problem?


Sat, 29 Jan 2005 07:26:03 GMT  
 passing arguments from awk to another script

Quote:


>> let awk call the subscript.  The following is untested code, so you must
>> test it:

>> awk '
>>     { line[NR]=$1}
>>     END {
>>         for (i=1;i<=NR;i++) {
>>             cmd = "subscript " line[i]
>>             system(cmd)
>>         }
>>     }
>>  ' testfile

> Thanks for the script!  But, unfortunately, it doesn't work . What
> could be the problem?

    What doesn't work?

    The awk script works perfectly; do you have a program or script
    called "subscript" in your path?

--
    Chris F.A. Johnson                        http://cfaj.freeshell.org
    ===================================================================
    My code (if any) in this post is copyright 2002, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License



Sat, 29 Jan 2005 08:44:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. passing arguments into awk script

2. how to pass an argument to awk with -f option

3. passing awk variables as arguments

4. passing arguments to script

5. How do I pass an argument while I when running a script

6. variables for arguments passed to a tcl script?

7. Problem in passing argument to script

8. Sourcing a script and passing arguments?

9. how to pass argument to tcl script ?

10. How to pass arguments between two tcl script ?

11. Passing command line variables to AWK in shell script

12. Passing values outside AWK script

 

 
Powered by phpBB® Forum Software