Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Running the server ➜ startup file problem

startup file problem

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by VanGota   (3 posts)  Bio
Date Tue 04 Feb 2003 10:32 PM (UTC)
Message
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 ...].
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 05 Feb 2003 08:55 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by VanGota   (3 posts)  Bio
Date Reply #2 on Thu 06 Feb 2003 03:08 AM (UTC)
Message
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!
Top

Posted by VanGota   (3 posts)  Bio
Date Reply #3 on Fri 07 Feb 2003 04:36 PM (UTC)
Message
tcsh 6.10.00 (astron) sorry forgot to tell you that

Thanks Nick!
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Thu 26 Feb 2009 08:18 PM (UTC)
Message
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

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Fri 27 Feb 2009 06:55 PM (UTC)
Message
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

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #6 on Fri 27 Feb 2009 07:16 PM (UTC)
Message
Bingo, that fixed it. Thanks.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Dextermovies   (65 posts)  Bio
Date Reply #7 on Thu 09 Apr 2009 03:25 PM (UTC)
Message
And how to we run it through this converter thing ?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #8 on Thu 09 Apr 2009 03:41 PM (UTC)
Message
http://www.linuxcommand.org/man_pages/dos2unix1.html

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


29,344 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.