Question: passing $var and "$var" into AWK from script

Question: passing $var and "$var" into AWK from script

Post by Jack Vins » Sat, 10 Apr 1993 00:07:18



Hello, I think I've seen discussion here before regarding this, but I have
previously scanned and ignored the messages.  Now I need more or less the
same help.

Here's the bare-bones situation:

I have a shell script (sh) which calls awk.  However, the script can take
several options and these will affect the result I get from the call to
awk.  Namely, I want to be able to pass $1, $0, etc. into awk along with
shell variables, such as $foo or whatever.

Basically, how do I protect the "$" in front of the field specifiers
because they are needed in AWK?

Thanks

The Purple Puddle Eater

 
 
 

1. Problems with "df" and "du" on "/var"

Hello,

I hope you have some help for a "UNIX-Newbie". Here is my problem:

When I start the command "df" on the directory "/var" (on a UNIX-Server with
SunOS 5.6) I get the information, that approximately 113 MB disk space are
occupied. When I use the command "du -k /var" the system says that are about
50 MB (58 MB as root) in use.
By doing the same process on other directories, I have no problems.

Can you help me? I hope so. Thanks.

Greetings
Michael

2. stripped utilities (Debian), gdb, and shared libraries

3. grep on '$VAR ' (read: $VAR with a SPACE " " after it)

4. httpd problem

5. sh var -> awk var -> sh var

6. any of you OCI programmers?

7. "cd -L /usr/adm ; lc .." == "lc /var" ??

8. Newbie problems with ethernet

9. is there a difference between var = X and var = "X" in a Korn shell ?

10. GETSERVBYNAME()????????????????????"""""""""""""

11. Sendmail/"/var/spool/mail/$USER" - question!

12. Passing shell var's into awk - another question

13. Need help not passing make vars as env vars in gmake.