Quote:
Originally Posted by
Corona688
I can't tell without seeing the script.
Which script, the Rational script or the .tcshrc login script? I'm afraid I cannot get the scripts off of the system they're on as it's a classified system. However, if it's the Rational script you're interested in, here's a real simple test you can try which I've done to duplicate this problem in a very simple form.
1. Create a script, say
abc, with the following...
echo hello
set xyz=aaa
2. At the bottom of your .tcshrc login file enter the following...
source abc
3. Now login and make sure you see the output from your echo, and then check your xyz environment variable to make sure it's set. If everything works up to this point, proceed with the next step.
4. Get on a remote host, or you can actually try this from the same host if you wish, but as a different user. Execute the following command.
$ scp -pr user@hostname:filename ~/.
...where
user is the user you set up your
abc script above and modified your .tcshrc file.
hostname is the name of the host for the same
user.
filename can be any file you want to copy from that users account. When you execute this command you should observe that the echo from your script is still being output, but no file will get copied. Why???
5. Now add some redirects to your sourced
abc script within your .tcshrc file. Try this for example...
source abc > /dev/null
6. Perform step 4 again. You should observe the output from the echo command still being shown. Why???
This should duplicate the kind of problem I'm experiencing.
Quote:
Originally Posted by
Corona688
Did you try redirecting stderr, too? or just stdout?
I believe so. Like I said, I'm not that familiar with tcsh. According to the man pages for tcsh it says... "The shell cannot presently redirect diagnostic output without also redirecting standard output...", so I tried this...
source /Rational/purifyplus_setup.csh >& /dev/null
This also did nothing. Output was still visable. There was a bunch of other syntaxes I tried as well, but I can't remember all of them now.
Quote:
Originally Posted by
Corona688
Depends what you're trying to do, which is not clear at this point.
We're simply trying to get the Rational script to execute upon login so the paths are automatically setup correctly (which already works), and at the same time get remote commands to successfully execute (which doesn't work, unless you do what I've already mentioned in my original post, upon which I still have my question of concern in #3).