[X-Unix] Re: BASH problem?

Peter Dyballa Peter_Dyballa at Web.DE
Tue Dec 7 11:35:29 PST 2004


Am 07.12.2004 um 12:47 schrieb 
x-unix-request at listserver.themacintoshguy.com:

> I've a script that runs nightly to
> pull and build Mozilla, the script is a Tcsh script with a first line
> of "#!/bin/tcsh -x"

Are you sure the output comes from bash? Invoking tcsh with '-x' makes 
it logging everything it executes, i.e. you get a carbon copy of its 
work. Making that '-x' disappear should save you from some reading.

I haven't tried myself '/bin/tcsh;source MozScript1d.txt;' but I would 
think that tcsh terminates when it reads the ';' because there is no 
command text to execute. The text after the ';' might be fed to your 
login shell ... and by chance bash knows the word 'source'! A more 
exact invocation would be 'tcsh ./commands.txt' or using the absolute 
path name of your commands text. When this text file itself starts with 
the above mentioned '#!/bin/tcsh', is a shell script, and is executable 
('chmod 755 <file>') you don't need to source it into a shell 
interpreter. The magic '#!' tells your login shell or any other 
interpreter to spawn a new process in which the named programme will 
act as interpreter for the following commands till the file's end.

--
Greetings

   Pete



More information about the X-Unix mailing list