Startup using exe or ./startup &

Posted by Marowi on Sat 20 Mar 2004 03:28 PM — 2 posts, 12,758 views.

#0
Ok. I have another post going with a related problem I guess (http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3882&page=1)

Basically, I'm using cygwin to compile, and then double clicking the exe to run. If I try to './startup &' it through cygwin I get the following error:

Quote:

./startup: 4: Syntax error: word unexpected (expecting "then")

The startup script is pasted below. Before you ask, I do have sh.exe in the described location, and my exe is in the area directory.
Quote:

#! ../../../../../bin/sh -f

set port = 4000
if ( "$1" != "" ) set port="$1"

cd ../area

nohup
nice
limit stack 1024k
if ( -e shutdown.txt ) rm -f shutdown.txt

while ( 1 )
set index = 1000
while ( 1 )
set logfile = ../log/$index.log
if ( ! -e $logfile ) break
@ index++
end

date > $logfile
date > ../area/boot.txt

../area/toth $port >&! $logfile

if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 15

end


Thanks
#1
I swear.. before this page had refreshed and posted, I worked out where the problem was.

I remembered seeing Nick post that you should use tcsh instead of any of the others on Windows XP. I can now run it using startup. Still having problems working out the makefile thing (see the other post, PLEASE!)