- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: default hpux posix shell doenst work but ksh d...
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
Discussions
Discussions
Forums
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
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
тАО07-03-2014 07:24 AM
тАО07-03-2014 07:24 AM
default hpux posix shell doenst work but ksh does on orace weblogic script
hi all,
a customer is trying to setup oracle weblogic on hpux 11.31. hes trying to run a reports.sh script with the default /bin/sh but it keeps having problems assigning variables. when he runs it as a ksh it works.
oracle support also ran it on a similiar hpux box they have and it worked. the customer doesnt really want to run ksh, he d
rather run the default hpux shell.
has anyone ever run into something similiar?
thx in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2014 07:42 AM
тАО07-03-2014 07:42 AM
Re: default hpux posix shell doenst work but ksh does on orace weblogic script
The script is missing the interpreter line: #!/usr/bin/ksh
The shell you use to login will be the default for scripts that do not specify the intended interpreter. That's why I consider the interpreter mandatory for all shell scripts. For about 95% of the features in the POSIX shell, ksh is a match, but there are differences, just like there are differences between bash and ksh. All 3 are considered to be 'POSIX' compliant but shell script writers are not often aware of the differences, thus the problems.
So keep your standard /usr/bin/sh or /sbin/sh POSIX shell and just add the interpreter line to the WebLogic script.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2014 07:56 AM
тАО07-03-2014 07:56 AM
Re: default hpux posix shell doenst work but ksh does on orace weblogic script
thx for the quick reply,
here is the top of the script, isnt that ok?
#!/bin/sh
#
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
#
## Example file to set environment variables in Bourne-shell or K-shell
## for Oracle Reports 10gR2. Refer to Install Doc for more detail on each
## of these environment variables. You need to modify some of the environment
## variables before doing source on this file ( % . reports.sh ).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2014 08:42 AM
тАО07-03-2014 08:42 AM
Re: default hpux posix shell doenst work but ksh does on orace weblogic script
Yes, #!/bin/sh is the interpreter line and it specifies the POSIX shell (/bin/sh points to /usr/bin/sh).
So change it to #!/usr/bin/ksh and the script should work fine.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2014 12:37 PM
тАО07-03-2014 12:37 PM
Re: default hpux posix shell doenst work but ksh does on orace weblogic script
thx