| View previous topic :: View next topic |
| Author |
Message |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2369 Location: wigan
|
Posted: Sat Jan 07, 2006 7:31 pm Post subject: unexpeted EOF? |
|
|
when i try to run lxprint i get this message | Quote: | /home/paul/bin/lxprint: line 41: unexpected EOF while looking for matching `''
/home/paul/bin/lxprint: line 46: syntax error: unexpected end of file
|
the code is | Code: | #!/bin/sh
if [ "$1" = --help ]; then
echo "Use lxprint to print out laTex files in one easy step."
echo "Just supply the name of a .tex file as an argument!"
echo " * or the base name of a numbered sequence of .tex files"
echo " to print them all!"
exit 0
fi
LATEXFILE="$1"
#If the filename supplied as an argument exists,
#then print it out.
if [ -f "$LATEXFILE" ]; then
DVIFILE="$(echo "$LATEXFILE" | sed 's/tex$/dvi/')"
latex "$LATEXFILE"
dvips "$DVIFILE"
else
#If the filename doesn't exist as supplied, see if
#it's a base filename-- for example. if the user
#supplied '02projections' as an argument and the file
#print another file.
if [ -f "{$LATEXFILE}1.tex"]; then
#The variable COUNTER will hold the current number
#in the sequence we're printing.We'll start at 1
#and use expr to add one to it each time we
#print another file.
COUNTER=1
while [ -f "$LATEXFILE$COUNTER.tex" ]; do
echo "Printing $LATEXFILE$COUNTER.tex
latex "$LATEXFILE$COUNTER.tex"
dvips "$LATEXFILE$COUNTER.dvi"
COUNTER=$(expr $COUNTER +1)
done
else
echo "There doesn't seem to be a file called $LATEXFILE."
exit 1
fi
fi
|
it's probably just a typo as you know what i'm like
also if i put a ";" at the end of every line would this cause any problems?
any help would be greatly appreciated
paul _________________ i am a follower of the culture
 |
|
| Back to top |
|
 |
dogsby
Joined: Thu Sep 08, 2005 12:03 am Posts: 14 Location: Kent
|
Posted: Sat Jan 07, 2006 7:47 pm Post subject: |
|
|
Are you missing a quote from the end of line 36?
| Code: | echo "Printing $LATEXFILE$COUNTER.tex
|
|
|
| Back to top |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2369 Location: wigan
|
Posted: Sat Jan 07, 2006 8:04 pm Post subject: |
|
|
thankyou so much that's it i was going cross eyed looking for about an hour trying to find a typo
thanks agian
paul _________________ i am a follower of the culture
 |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|