Please can you help me in solving the following error as I am logging in with any user, on my HP-UX system.
The error is /etc/profile[125]: Syntax error: `then' is not matched.
I have looked into /etc/profileline 125, but I dont see anything wrong.
I agree with MadeInGermany, but a not too wild guess would be that /etc/profile contains at least 124 lines and somewhere in the first 124 lines there is an if ... then with no matching fi.
And, as I said, there is in your code:
with no matching fi. And, /etc/profile should be executable by a Bourne shell, but [[expression]] is not valid in a Bourne shell and is not valid in a 1988 version of ksh either (which, if present on your system should also use /etc/profile).
Removing from 126 on should leave you with the same problem. You need to remove line 125 as well!
This User Gave Thanks to Don Cragun For This Post:
The header states it is HP-UX 11.31. In HP-UX 11.x the Bourne /bin/sh has been replaced by a Posix shell.
And this /bin/sh does know the [[ ]]. Also the ksh-88 knows it.
(While an old Bourne shell does not even know the $( ).)
These 2 Users Gave Thanks to MadeInGermany For This Post:
The header states it is HP-UX 11.31. In HP-UX 11.x the Bourne /bin/sh has been replaced by a Posix shell.
And this /bin/sh does know the [[ ]]. Also the ksh-88 knows it.
(While an old Bourne shell does not even know the $( ).)
Thanks for pointing this out. I believe that the POSIX compliant /bin/sh on HP/UX is a version of the 1988 Korn shell. ksh88 does include [[ expression ]] but more expression primitives are available in ksh93 than were available in ksh88. The expression used in this case is valid in both ksh88 and ksh93. (But the if does still need a closing fi.)
This User Gave Thanks to Don Cragun For This Post:
During batch processing the following error occurs and will stop the process, ~environment_name/.profile : not found. The error happens randomly. Any ideas? (6 Replies)
Hello
I really wonder what's trap in etc/profile and in each user .profile.
I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing.
I want to know ...
1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Hi,
I am working on HPUX 11.11i and 11.10 boxes. My default shell is ksh.
I have the following entry in my profile file
HOSTNAME=`uname -n`
Every time I login to the server, this is the error I get:
${HOME:-.}/.profile: syntax error: `)' unexpected
The line number shown... (1 Reply)
Hi
I know from reading O Riley's Classic Shell Scripting' that the .profile file is " the shells configuration file" but I am unable to find a reference to what "..profile" means. I have searched on the net, Sams Teach Yourself Unix, Unix Visual Quickstart Guide and Linux in a Nutshell. I have... (2 Replies)
I'm trying to update my profile with a temp e-mail address. This is a hotmail e-mail address and it wont allow it.
The reason for this is I've changed my service with my ISP since I've moved :D and well I've gone form Cable to DSL :mad: Now my e-mail accounts are still there but I can't... (4 Replies)
hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix.
please explain..
thanks (4 Replies)