( 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



 Sign up for the DeepChip newsletter.
Email
 Read what EDA tool users really think.


Feedback About Wiretaps ESNUGs SIGN UP! Downloads Trip Reports Advertise

"Relax. This is a discussion. Anything said here is just one engineer's opinion. Email in your dissenting letter and it'll be published, too."
This Web Site Is Modified Every 2-3 Days
Copyright 1991-2024 John Cooley.  All Rights Reserved.
| Contact John Cooley | Webmaster | Legal | Feedback Form |

   !!!     "It's not a BUG,
  /o o\  /  it's a FEATURE!"
 (  >  )
  \ - / 
  _] [_     (jcooley 1991)