bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden


From: Scollan, David
Subject: address@hidden
Date: Mon, 5 Mar 2001 16:24:26 -0000

# Try to print the contents of a file using a gawk function
# This does not work. You need to put the code in an awk script and use nawk -f awk_script < $FILE
# WHY?

FILE=$1
gawk '{
        function func1( param1 ){
                print param1
                return
        }
        func1( $0 )
}' $FILE    


Also, you can't put a ' in a comment but you can if you use gawk -f awk_script < $FILE as above  ie
This script will fail WHY?
gawk '{
        print $0                # The single quote isn't allowed in this comment
}' $FILE 

DS

Note im using -:
> uname -a
SunOS dom3 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-Enterprise-10000            



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

reply via email to

[Prev in Thread] Current Thread [Next in Thread]