( ESNUG 200 Item 2 ) ---------------------------------------------- [10/28/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: jiml@qualis.com (James W. Lewis)
Hi John, it does not seem to be a problem with understanding $USER as the
following does work:
sh ls my_file | mail $USER
I tried several other things but did not seem to be able to get it to work.
It looks strange. Could be a bug or a lack of support for some sh features.
To answer the other part of your question, to get an environment variable
from UNIX, use:
SYNOPSYS_DIR = get_unix_variable("SYNOPSYS")
Now use it just like another synopsys variable:
system_cache = SYNOPSYS_DIR + "/libraries/syn"
As far as finding this in the on-line doccumentation, check out the
application notes section. In particular, dc_shell Scripts for Synthesis.
- Jim Lewis
Qualis Design
---- ---- ----
From: macauley@vnet.ibm.com (Kevin Macauley)
A friend of mine found the answer to this one. We use the following inside
of our ".synopsys_dc.setup" files so it should work fine for you.
synopsys_setups = get_unix_variable("DSP_SYNOPSYS_SETUPS")
include synopsys_setups + "/techi.synopsys_dc.setup"
Just change the DSP to USER. (Of course, to be really smart you could then
set designer to be the USER variable).
- Kevin Macauley
IBM
---- ---- ----
From: Hiroshi Kawashima <kei@sm.sony.co.jp>
Hello John, Maybe this is what you want:
get_unix_variable("USER")
user_name = dc_shell_status
sh ls -l netlist.v | Mail -s "'Netlist-completed'" user_name
- Hiroshi Kawashima
Sony Corporation
|
|