Hi,
My startup file keeps giving me this wierd error, and
all my friends and coders have no clue. I seem to notice
my dystopia startup did the same but i have one that does work and its written like straight and the other is paragraph and has some boxes (im not good at scripting)
here's the error:
Unknown option: `-
Usage: csh [ -bcdefilmnqstvVxX ] [ argument ...].
It is hard to debug a script without seeing it. If it isn't too long perhaps post it here?
Also, can you tell us which operating system you are using (eg. Linux, Windows using Cygwin) and which version of csh, by typing:
csh -c set
Report the contents of the "version" variable.
Yah its not too long, and it says linux,
#! /bin/csh -f
# Set the port number.
set port = 5832
if ( "$1" != "" ) set port="$1"
# Change to area directory.
cd ../area
# Set limits.
nohup
nice
limit stack 1024k
if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 )
# If you want to have logs in a different directory,
# change the 'set logfile' line to reflect the directory name.
set index = 1000
while ( 1 )
set logfile = ../log/$index.log
if ( ! -e $logfile ) break
@ index++
end
# Record starting time
date > $logfile
date > ../area/boot.txt
# Record initial charges
# charges >> $logfile
# Run SMAUG.
../src/swreality $port >&! $logfile
# ../src/swreality >>&! $logfile
# Record ending charges
# charges >> $logfile
# # Delete this out if no adb.
# if ( -e core ) then
# echo '$c' | adb ../src/smaug
# endif
# Restart, giving old connections a chance to die.
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 15
end
Thx!
tcsh 6.10.00 (astron) sorry forgot to tell you that
Thanks Nick!
What exactly causes this error? Getting it now myself.
tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options wide,nls,dl,al,kan,rh,color,filec
A search for that error message revealed this possible solution:
Quote:
Your export/import script is in DOS format and you copied it to your unix box to run (gauranteed). Run your script through the dos2unix command which will convert it. To verify that this is your problem, simply cat your script and you'll see that the lines are not properly terminated with CR/LF
Bingo, that fixed it. Thanks.
And how to we run it through this converter thing ?
http://www.linuxcommand.org/man_pages/dos2unix1.html