- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Bad Number/Syntax Errors
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 03:27 AM
10-27-2004 03:27 AM
Bad Number/Syntax Errors
su -
However every single time the startup script executes I get the following error in the rc.log file:
^˜\p^^â\: Syntax error
or:
Ø\p^¢\: bad number
Now after the system is completely up and running I can execute the same script successfully.
If I take out the alter the command from:
su -
su
it works. Altered it back and deleted the user's .profile (so the (-) is executing nothing) and the same errors returned?
Now the difference between the two errors:
Syntax error and bad number depends on the shell I'm executing the script in. If /sbin/sh its a syntax error and if its the ksh its a bad number.
Any advi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 03:29 AM
10-27-2004 03:29 AM
Re: Bad Number/Syntax Errors
the .profile of the user gets executed. You have a problem with code in .profile, which gives error.
When you do su "user_name -c "command", the user's .profile is not executed.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 03:33 AM
10-27-2004 03:33 AM
Re: Bad Number/Syntax Errors
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 04:14 AM
10-27-2004 04:14 AM
Re: Bad Number/Syntax Errors
is the
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:01 AM
10-27-2004 05:01 AM
Re: Bad Number/Syntax Errors
Thanks anyway...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:11 AM
10-27-2004 05:11 AM
Re: Bad Number/Syntax Errors
S999<script> I believe this shall take away the problem..
What happens when you execute the script in /etc/init.d and not the su user_id -c <script>
just check and reply..
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:26 AM
10-27-2004 05:26 AM
Re: Bad Number/Syntax Errors
rather irritating about the shell, as c-shell would have fitted in nicely, also because ksh normally indicates a line number for the syntax error.
However, "bad number" may come from an if-condition that tries to compare a numeric value to either a text string - or more often - to an unexpanded variable. Is there anything like that in the script?
regards,
John K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:38 AM
10-27-2004 05:38 AM
Re: Bad Number/Syntax Errors
/usr/bin/su - oracle -c "/usr/bin/ls -l /tmp > /tmp/ls.out" 2>&1
(Also tried different users!)
The syntax error or bad number depends on the shell I defined the user in.
Also this started to happen after the lastest June 2004 bundle for HP 11.11.
The su is actually successfully, however something afterwards in the shell environment is blowing up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:44 AM
10-27-2004 05:44 AM
Re: Bad Number/Syntax Errors
And as long as the script name is different S999 shall not matter..
if oracle starup is
S999oracle
then new script can be
S999pxxx...I believe it shall get through the problem..or just make the syntax part of some other script whihch executes in last..
Hope it helps
Let me see if I can find anything more on this
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:47 AM
10-27-2004 05:47 AM
Re: Bad Number/Syntax Errors
nohup
in the beginning..try this
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:55 AM
10-27-2004 05:55 AM
Re: Bad Number/Syntax Errors
If you have access, search for "ksh bad number".
But it says that PHCO_26783 or PHCO_27418
cause "bad number" error in oracle environment setup script called from .profile. Offending command is "ulimit 4194304". Should be changed to "ulimit unlimited".
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:56 AM
10-27-2004 05:56 AM
Re: Bad Number/Syntax Errors
su - userid -c '/path/to/script -options'
this is one hint to resolve it.
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 09:16 AM
10-27-2004 09:16 AM
Re: Bad Number/Syntax Errors
/usr/bin/su - oracle -c "/usr/bin/ls -l /tmp > /tmp/ls.out" 2>&1
The command runs only up to the su, everything else doesn't run, put the /etc/profile in verbose mode and everything runs correctly.
In response to above, the ksh bad number is a ulimit problem and the error would be "unlimited bad number".
These same startup scripts run successfully if I execute them after the startup.
Now these error messages seem to be related to the shell environment and not a .profile or /etc/profile problem.
Just wondering if anyone ran into this problem before? Very weird.....