Path: utzoo!attcan!uunet!husc6!rutgers!ucsd!ucbvax!BRL.MIL!ortwein From: ortwein@BRL.MIL (Mick Ortwein) Newsgroups: comp.sys.sgi Subject: Re: awk question Message-ID: <9006111349.aa12274@SEM.BRL.MIL> Date: 11 Jun 90 17:49:56 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 18 Last I remember (when awk was my life), in order to bring a shell variable into awk you need to use single quotes around the variable. The effect is that the value of the variable is written on top of the quoted word before awk interprets the rest of the commands (sort of a preprocessor if you will). Put the following two lines into a file called "example" #!/bin/sh awk '{printf("%s\n","'$HOME'")}'