Re: unexpected end of file

2000-01-17 Thread ulla . russell



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?

TIA and thanks for your previous reply.




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.

Ethan




Re: unexpected end of file

2000-01-17 Thread Dänzer


--- [EMAIL PROTECTED] 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


Re: unexpected end of file

2000-01-16 Thread Hartmut Figge
[EMAIL PROTECTED] wrote:

 'bash: /root/.profile: line 11: syntax error: unexpected end of file'

i would would view this file with mc, switching to hex-mode and look for
suspicious characters.

-- 
hafi


Re: unexpected end of file

2000-01-16 Thread ulla . russell

I do not have mc installed. I used the -x switch on the f
ile (od -x .profile, this also allows files to be viewed 
in hex).

I didn't see anything suspicious. Does anyone have any
other ideas? 

If I was to install midnight commander what instruction 
would I have to give to view files in hex?

The problem is worse than I at first realised, since this
files contains $PATH for root and it's not being loaded. I 
suppose there are ways around this problem, but it would
be nice to find out why the problem arose in the first 
place or at least how to fix it.







At 01:38 16.1.2000 +0100, you wrote:
[EMAIL PROTECTED] wrote:

 'bash: /root/.profile: line 11: syntax error: unexpected end of file'

i would would view this file with mc, switching to hex-mode and look for
suspicious characters.

-- 
hafi


-- 
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] 
/dev/null




Re: unexpected end of file

2000-01-16 Thread Ethan Benson

On 16/1/2000 [EMAIL PROTECTED] wrote:


I do not have mc installed. I used the -x switch on the f
ile (od -x .profile, this also allows files to be viewed
in hex).

I didn't see anything suspicious. Does anyone have any
other ideas?

If I was to install midnight commander what instruction
would I have to give to view files in hex?

The problem is worse than I at first realised, since this
files contains $PATH for root and it's not being loaded. I
suppose there are ways around this problem, but it would
be nice to find out why the problem arose in the first
place or at least how to fix it.


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.


Ethan