Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

unexpeted EOF?

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2425
Location: wigan

PostPosted: Sat Jan 07, 2006 7:31 pm    Post subject: unexpeted EOF? Reply with quote

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 Very Happy
also if i put a ";" at the end of every line would this cause any problems?
any help would be greatly appreciated Very Happy
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
dogsby



Joined: Thu Sep 08, 2005 12:03 am
Posts: 14
Location: Kent

PostPosted: Sat Jan 07, 2006 7:47 pm    Post subject: Reply with quote

Are you missing a quote from the end of line 36?

Code:
      echo "Printing $LATEXFILE$COUNTER.tex
Back to top
View user's profile Send private message Visit poster's website
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2425
Location: wigan

PostPosted: Sat Jan 07, 2006 8:04 pm    Post subject: Reply with quote

thankyou so much Very Happy that's it Very Happy i was going cross eyed looking for about an hour trying to find a typo Rolling Eyes
thanks agian
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast