Can AWK recept parameter dynamically? 
Author Message
 Can AWK recept parameter dynamically?

On Mon, 15 May 2000 18:27:32 -0400, Yongjian Ye

[html stripped]

Quote:
>Hello all,
>I need dynamically input some parameter in AWK program
>Is it availabe? Or awk has some build-in function like 'read' in shell
>...
>I mean input parameter during the awk program is running.
>My task is count different years' thing as the year defined by the
>program
>user. Data file like this:
>Jan    1998     user1    
>12
>....
>May    1999     user1  
>35
>......
>Apr    2000     user3    
>33
>....
>I need only one awk program file with the ability that can count any
>year I willing,not to count users' yearly amount.

Post to NGs in plain ASCII not html!
You will get more (non-flame) responses.

You may want to look at getline:

        getline [variable] [< file]

If redirection is omitted, reads from std input.
If variable is omitted, reads into $0 and performs usual field
splitting.

Thanks. Take care, Brian Inglis         Calgary, Alberta, Canada
--

                                use address above to reply



Sat, 16 Nov 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Can AWK recept parameter dynamically?

2. dynamically call a procedure WITH parameters in another dll

3. inserting parameters into URLs dynamically

4. shell-parameter for outputfile in awk

5. passing parameter from awk back to korn shell

6. ext. command with awk variable as parameter

7. Pass an AWK variable to a pipeline program as a parameter

8. Using Parameter in Awk

9. Help passing command line parameters to awk scripts

10. THANKS: Help passing command line parameters to awk script

11. Interpret awk parameter as a command

12. CA Cans VO ?

 

 
Powered by phpBB® Forum Software