[torqueusers] Sourcing files does not work
Coyle, James J [ITACD]
jjc at iastate.edu
Wed Apr 14 15:16:09 MDT 2010
G. ,
Perhaps I am missing the point, but it looks like you are mixing shells
which do not have the same syntax for setting variables.
You are in the tcsh when you issue the command
source /home/gdim/.bashrc_modified
but in the tcsh, csh style commands are expected (e.g. setenv PATH ${PATH}:/usr/local/bin )
while in a Bourne style shell like bash you would expect something like:
export PATH=${PATH}:/usr/local/bin
I'd guess the problem is that you should use
#!/bin/bash
As exactly the first line of your script rather than #!/bin/tcsh
likely the sourcing would work.
Alternatively you could put the csh equivalents of the commands you
need in the file ~/.cshrc
which would automatically be sourced by a script starting with #!/bin/tcsh.
James Coyle, PhD
High Performance Computing Group
115 Durham Center
Iowa State Univ.
Ames, Iowa 50011 web: http://www.public.iastate.edu/~jjc
-----Original Message-----
From: torqueusers-bounces at supercluster.org [mailto:torqueusers-bounces at supercluster.org] On Behalf Of Dimitrakakis Georgios
Sent: Wednesday, April 14, 2010 2:55 PM
To: torqueusers at supercluster.org
Subject: Re: [torqueusers] Sourcing files does not work
Thanks for the recommendation!
The following doesn't look ok to me:
+ source /home/gdim/.bashrc_modified
++ '[' -z '' ']'
++ return
and then it has the following
+ echo (ALL THE $PATH VARIABLE) without the changes.
What do you think??
Regards,
G.
> On 13/04/10 01:54, Dimitrakakis Georgios wrote:
>
>> Do you know why this happens??
>> Is there a certain option which may have been different
>> in the batch system that does this?
>
> Not that I can think of, but what I would suggest is
> that you add:
>
> set -x
>
> before the call to source the script to make bash print
> out everything it is doing as it runs that and subsequent
> commands, that way you should get some useful info to
> debug with.
>
> cheers!
> Chris
> --
> Christopher Samuel - Senior Systems Administrator
> VLSCI - Victorian Life Sciences Computational Initiative
> Email: samuel at unimelb.edu.au Phone: +61 (0)3 903 55545
> http://www.vlsci.unimelb.edu.au/
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
torqueusers mailing list
torqueusers at supercluster.org
http://www.supercluster.org/mailman/listinfo/torqueusers
More information about the torqueusers
mailing list