Lots of users add an
It's gotten so common that some vendors add a workaround to defeat the
For instance, some versions of the
variable so that it can see your aliases "hidden"
test. I've also seen a version of
that starts an interactive shell to run jobs.
If you've buried commands after
that should only be run
on interactive shells or at login time, then you may have trouble.
There are workarounds.
What you'll need depends on the problem you're trying to work around.
The version of
on the CD-ROM works without reading your
file, so there's no problem there.
Here's a way to stop the standard
from reading parts of
that you don't want it to read.
The first time you log in, this scheme sets a
environment variable (
The variable will be copied into all
(like the one that
In subshells, the test
will branch to the end of your
if (! $?prompt) goto cshrc_end
# COMMANDS BELOW HERE ARE READ ONLY BY INTERACTIVE SHELLS:
alias foo bar
if ($?CSHRC_READ) goto cshrc_end
# COMMANDS BELOW HERE ARE READ ONLY AT LOGIN TIME:
setenv CSHRC_READ yes
If you have a buggy version of
that runs jobs from interactive
your own front-end to
that sets an environment variable named
temporarily before it
Add a test to your
that quits if
# at JOBS RUN INTERACTIVE SHELLS ON MY BUGGY VERSION OF UNIX.
# WORKAROUND IS HERE AND IN THE at ALIAS BELOW:
if ($?AT) goto cshrc_end
alias at '(setenv AT yes; \at \!*)'
Most modern versions of
save a copy of your environment and
restore it, later, when the
job is run.
At that time, the
environment variable will be set; the C shell will
skip the parts of your
that you want it to.
It's ugly, but it works.
Those workarounds probably won't solve all the problems on your version of
UNIX, but I hope they'll give you some ideas.