( ESNUG 201 Item 1 ) ---------------------------------------------- [11/10/94]
Subject: (ESNUG 199 #4) "Silly dc_shell/Environment Variable Question"
> I have a script in which I want to:
>
> sh ls -l netlist.v | Mail -s \"Netlist-completed\" $USER
>
> I want to mail to $USER instead of "designer" since we do not always
> have this variable set from user to user. $USER does not work, I can't
> seem to get access to Unix environment variables or get them into a
> dc_shell variable. Can it be done?
From: poorna@S3.COM (Poorna Rao)
I was able to do the above with a very small modification, i.e. enclose the
argument to sh in quotes:
sh "ls -l netlist.v | Mail -s \"Netlist-completed\" $USER"
The reason you have to do this is because of the phrase Netlist-completed
in quotes. The following will also work:
sh ls -l netlist.v | Mail -s Netlist-completed $USER
- Poorna Rao
S3 Incorporated
|
|