Passing the current directory path to a variable - awk on a PC 
Author Message
 Passing the current directory path to a variable - awk on a PC

Is there a neat way of passing the current directory path to a variable so I
can use it in a print command?  I am trying to use gawk to write a command
file for gnuplot based on information in a number of data files.


Fri, 09 Aug 2002 03:00:00 GMT  
 Passing the current directory path to a variable - awk on a PC

Quote:

> Is there a neat way of passing the current directory path to a variable so I
> can use it in a print command?  I am trying to use gawk to write a command
> file for gnuplot based on information in a number of data files.

gawk 'BEGIN { print ENVIRON["PWD"]}'
__________________________________________________________________

           o                     Eiso AB

                 o               Dept. of Biochemistry
                                 University of Groningen                
                                 The Netherlands                      
                  o  
            . .    
         o   ^                  
         |   -   _              
          \__|__/                
             |                  
             |
            / \
           /   \
           |   |
________ ._|   |_. ________________________________________________



Fri, 09 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Path name of current directory

2. Invoking awk from different directories/PATH

3. Current Directory to a Global Variable

4. Making file path control only select directory paths not file names

5. passing on variables - security and directory listings

6. Passing command line variables to AWK in shell script

7. How to pass shell variable to awk?

8. : Passing Variable to awk

9. passing variables to awk scripts

10. search on variable passed to awk /nawk

11. Passing an environment variable to a system call within awk

12. pass a variable from awk to shell

 

 
Powered by phpBB® Forum Software