Operating System - Linux
1828352 Members
3384 Online
109976 Solutions
New Discussion

Re: error in .profile file

 
SOLVED
Go to solution
Adrian Sobers2
Super Advisor

error in .profile file

I just installed patch #4163445 which upgraded my 9.2.0.6 home to 9.2.0.7

However when I log into the machine I get the following error message:

.profile[55]: Syntax error: `then' is not
matched.

This never happened before. Could the patch have messed up my .profile file?

The file is attached.


5 REPLIES 5
Rick Garland
Honored Contributor
Solution

Re: error in .profile file

I do not even see 'then' in the attached file. Is this the complete .profile for the login account in question?

Look at date/time stamp. The patch would not have changed individual .profiles.

Look at the date/time stamp of the /etc/profile.

Adrian Sobers2
Super Advisor

Re: error in .profile file

sorry, i realized that afterwards.

attached is the profile file from /etc
Steven E. Protter
Exalted Contributor

Re: error in .profile file

Well, this error indicates one of two things as far as I can recall.

1) There is within a if then fi loop some code that prematurely terminates the loop, causing a mismatch.

2) There is an if or a fi or a then missing on one of your loops.

I'd use the diff command to compare the profile that oracle backed up before it updated and that should help find the problem.

I sure hope Oracle backed up the file or you'll need to get the original off a backup.

Its quite common for Oracle to release code that is not adequately tested for HP-UX and leave us as admins to debut it.

diff /etc/profile /etc/profile.backup

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Andrew Bruce
Valued Contributor

Re: error in .profile file

Hi Adrian,

I'm clutching at straws here!

The complaint is for line 55 which is the if,then,fi section for setting up your timezone.

What is the content of your /etc/TIMEZONE file?

The only other thing is that later on, you have a section with a line continuation character '\' - this shouldn't be a problem, but it's maybe worth putting the 'if' statement all on one line!

Like I said, clutching... ;-)

Regards,

Andy Bruce
I Love it when a plan comes together!
Adrian Sobers2
Super Advisor

Re: error in .profile file

this was solved in another thread.

i was missing a "fi" at the end of the script.

Thanks all.