[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: unexpected end of file




--- ulla.russell@pp.inet.fi wrote:

> Ethan you were partially correct in your reply.
> 
> When I comment out the if structure that tests for the
> existence of .bashrc, and 'sources' it if it does exist,
> there are no problems. That is, I can source the file 
> without any problems.
> 
> However the problem seems still to be elsewhere. 
> 
> When I uncomment the if structure I am able to run the file as
> an argument to bash, i.e "bash .profile" or, after changing
> the files permissions, as a shell programme "./.profile". 
> This suggest (to me at least) that the problem is not one 
> of syntax.
> 
> It looks like something is broken. 
> 
> I have tried creating and then sourcing simple shell scripts 
> and they suffer from the same problem.
> 
> Do you or anyone else have any sugestions?

> >Its probably not as complicated as you are making it, more likely 
> >there is just a stray " or something
> >
> >if there are any if then structures make sure they are terminated 
> >with a fi, all { have a matching } and so on.
> >
> >all it takes is one stray " ' or ` to cause that, bash keeps looking 
> >for the closing quote, or the fi or whatever and if it gets to the 
> >end of file it complains.

IIRC I used to get the error in the Subject when I forgot to add a blank line
at the end of scripts.


Michel


=====
"Software is like sex; it's better when it's free"
 -- Linus Torvalds

"If you continue running Windows, your system may become unstable."
 -- Windows 95 BSOD
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


Reply to: