GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: using /usr/bin/ulimit
Operating System - HP-UX
1847056
Members
5648
Online
110261
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-18-2002 07:11 AM
07-18-2002 07:11 AM
using /usr/bin/ulimit
I have to admit I don't know shell scripting very well, but I'm trying to understand the usefulness of the script /usr/bin/ulimit. These are the contents of this script on my HP-UX 11.00 system:
--------
#!/usr/bin/sh
# @(#) $Revision: 76.1 $
# This is the execable version of ulimit implemented using the
# posix shell built-in ulimit command.
ulimit $@
exit $?
--------
It looks to me like this script executes the shell /usr/bin/sh, calls the ulimit command of that shell with any parameters passed in, and then exits with the status of that command. If that's the case, what would you use this script for, as once you exit the shell created by this script, any setting performed by the sh-posix 'ulimit' command would be lost.
I'm probably missing something here... please clue me in. By the way, I'm in a situation where I have a korn shell script and I want to limit the core dump size within this script. This is not possible with the ksh 'ulimit' command on HP-UX and I'm wondering if there's a way for me to do this without converting my ksh script to a /usr/bin/sh or csh script as ksh on Solaris supports 'ulimit -c' and this script needs to run on Solaris also.
--------
#!/usr/bin/sh
# @(#) $Revision: 76.1 $
# This is the execable version of ulimit implemented using the
# posix shell built-in ulimit command.
ulimit $@
exit $?
--------
It looks to me like this script executes the shell /usr/bin/sh, calls the ulimit command of that shell with any parameters passed in, and then exits with the status of that command. If that's the case, what would you use this script for, as once you exit the shell created by this script, any setting performed by the sh-posix 'ulimit' command would be lost.
I'm probably missing something here... please clue me in. By the way, I'm in a situation where I have a korn shell script and I want to limit the core dump size within this script. This is not possible with the ksh 'ulimit' command on HP-UX and I'm wondering if there's a way for me to do this without converting my ksh script to a /usr/bin/sh or csh script as ksh on Solaris supports 'ulimit -c' and this script needs to run on Solaris also.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2002 07:40 AM
07-18-2002 07:40 AM
Re: using /usr/bin/ulimit
Hi Chris:
The script is a wrapper to call 'ulimit' as noted. Whatever arguments you pass to it are passed to 'ulimit'.
Why not write your script as a Posix one (/usr/bin/sh) since for HP-UX, this is a superset of the Korn (/usr/bin/ksh)? Then, on your Solaris system, you could (merely?) change the shell interpreter declaration if/as necessary.
Regards!
...JRF...
The script is a wrapper to call 'ulimit' as noted. Whatever arguments you pass to it are passed to 'ulimit'.
Why not write your script as a Posix one (/usr/bin/sh) since for HP-UX, this is a superset of the Korn (/usr/bin/ksh)? Then, on your Solaris system, you could (merely?) change the shell interpreter declaration if/as necessary.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2002 04:09 AM
07-19-2002 04:09 AM
Re: using /usr/bin/ulimit
Hi James,
Thanks for your reply. I was hoping to find a way to keep the script identical on both HP-UX and Solaris (to keep the installation procedure of our system as simple as possible), but I guess I'll just go with your suggestion of just changing the first line of the script for the appropriate interpreter, which is a minor change the installation routine can handle.
Thanks!
- Chris
Thanks for your reply. I was hoping to find a way to keep the script identical on both HP-UX and Solaris (to keep the installation procedure of our system as simple as possible), but I guess I'll just go with your suggestion of just changing the first line of the script for the appropriate interpreter, which is a minor change the installation routine can handle.
Thanks!
- Chris
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP