[X-Unix] BASH problem?
Xavier Noria
fxn at hashref.com
Tue Dec 7 16:54:17 PST 2004
On Dec 8, 2004, at 1:33 AM, Russell McGaha wrote:
> Start of script segment
>
> #!/bin/tcsh -x
>
> set Myday = `date '+%a'`
> echo $Myday `date` | tee -a tempfile
> setenv CVSROOT :pserver:anonymous at cvs-mirror.mozilla.org:/cvsroot
>
> end of script segment
>
> errors
>
> [18:30:21 Tue Dec 07] [localhost:~] russellm$source MozScript1d.txt
> Tue Dec 7 18:30:53 CST 2004
> -bash: setenv: command not found
> -bash: @: command not found
> -bash: MozScript1d.txt: line 16: syntax error near unexpected token
> `else'
> -bash: MozScript1d.txt: line 16: ` else'
The problem is that "source" tells your current shell to interpret the
file (with some additional details which may not be important now).
Just give execution permissions:
chmod u+x filename
and execute it:
./filename
Unless "source" was used on purpose because of those additional
details. In such case you'd need to port the script to bash.
-- fxn
More information about the X-Unix
mailing list