cdohert@ccvax.ucd.ie (06/10/91)
Hi Unix Wizards,
I am attempting to write my first shell script and I'm perplexed
by the error message I'm getting from the shell parser.
The script is as follows
******************************************************************
for network in 1 2 3 5 10 20 30
do
`expulse` $network 0
if test -f pulse.${network}.net
then `cascor1.3` <<!
pulse.${network}.net
1000
1000
y
y
pulse.${network}.wts
!
> pulse.${network}.output
fi
done
******************************************************************
#`expulse` & `cascor1.3` are programs that take various arguments.
prompt>sh script
results in the error:
line 22 `end of file' unexpected.
My question is why?
Probably elementary error but any pointers welcome.
Conor Doherty
Dept of Computer Science
University College Dublin
daved@physiol.su.oz.au (Dave Davey) (06/11/91)
In <1991Jun10.145413.48155@ccvax.ucd.ie> cdohert@ccvax.ucd.ie writes:
->Hi Unix Wizards,
->I am attempting to write my first shell script and I'm perplexed
->by the error message I'm getting from the shell parser.
->The script is as follows
->for network in 1 2 3 5 10 20 30
->do
-> `expulse` $network 0
-> if test -f pulse.${network}.net
-> then `cascor1.3` <<!
-> pulse.${network}.net
......
......
......
......
......
-> !
^^^^^
The indent may look pretty, but the shell is looking for a line
starting with a '!', not white space.
ohl@kivax.UUCP (Ralf Ohlhausen) (06/13/91)
cdohert@ccvax.ucd.ie writes: >The script is as follows >****************************************************************** >for network in 1 2 3 5 10 20 30 >do > `expulse` $network 0 > if test -f pulse.${network}.net > then `cascor1.3` <<! > pulse.${network}.net > 1000 > 1000 > y > y > pulse.${network}.wts > ! <------ ^ try again with your EOF "!" in the first column > > pulse.${network}.output > fi >done >prompt>sh script > results in the error: >line 22 `end of file' unexpected. Hopefully not any more ... B-) Ralf -- Ralf Ohlhausen * e-mail: ohl@kivax.uucp * In all probability Digital Kienzle Computer- * Europe:..!mcsun!unido!kivax!ohl * this is once again systeme Abt. 015.4 * USA: ..!uunet!unido!kivax!ohl * only my opinion ! D-7730 VS-Villingen FRG * voice: +49 7721 867181 *