HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell/Nawk/Compatibility
Operating System - HP-UX
1828979
Members
2201
Online
109986
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
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
09-06-2002 12:49 AM
09-06-2002 12:49 AM
Shell/Nawk/Compatibility
I have written an oracle reporting program using shell and nawk on a solaris box.
The version of nawk I am using can accept a large number of characters passed in via a variable using -v.
The problem is, awk on HP-UX 11 doesn't seem to be able to handle the same amout of characters, does anybody know of a version of HP-UX awk that does. We are totally stuck as we don't actually have a HP-UX box here to try this out.
Any comments/help would be very greatly appreciated.
The version of nawk I am using can accept a large number of characters passed in via a variable using -v.
The problem is, awk on HP-UX 11 doesn't seem to be able to handle the same amout of characters, does anybody know of a version of HP-UX awk that does. We are totally stuck as we don't actually have a HP-UX box here to try this out.
Any comments/help would be very greatly appreciated.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2002 01:43 AM
09-06-2002 01:43 AM
Re: Shell/Nawk/Compatibility
Hi
If I am correct nawk in Solaris is basically the same as awk in HP-UX but there can be some differences in implementation. For some years a "nawk" exist in HP-UX too together with the older awk. In later versions of HP-UX nawk replaced awk but Sun has for some reasons keep both.
I can,t find any dokumentation about max length for variables either in HP-UX awk or in Solaris nawk, only that there can be differences.
How long variables do you pass, can you perhaps give a example. I think it is possible to find a workaround.
If I am correct nawk in Solaris is basically the same as awk in HP-UX but there can be some differences in implementation. For some years a "nawk" exist in HP-UX too together with the older awk. In later versions of HP-UX nawk replaced awk but Sun has for some reasons keep both.
I can,t find any dokumentation about max length for variables either in HP-UX awk or in Solaris nawk, only that there can be differences.
How long variables do you pass, can you perhaps give a example. I think it is possible to find a workaround.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2002 04:09 AM
09-06-2002 04:09 AM
Re: Shell/Nawk/Compatibility
I am using this for CGI, and the data being passed comes from quite a complex html page, the cgi string is in the region of 400 characters. I would pipe this information in but There is data being piped in as well from sqlplus.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2002 05:46 AM
09-06-2002 05:46 AM
Re: Shell/Nawk/Compatibility
Probably your best bet is to use the Gnu version of awk (gawk) on all platforms. In general, HP's awk is nawk but there may be some platform differences. If you go with gawk on all platforms those differences will disappear. Gawk is actually a superset of awk (and nawk) and many other limits like 3,000 characters per record (line) not become unlimited.
Here is a source for gawk:
http://hpux.cs.utah.edu/hppd/hpux/Gnu/gawk-3.1.1/
The other difference is that /usr/bin/sh on HP-UX in not Bourne but rather the POSIX sh which except fog very minior differences is the Korn sh. I've never found problems running ksh scripts under the POSIX shell but you can use ksh on HP-UX as well.
Here is a source for gawk:
http://hpux.cs.utah.edu/hppd/hpux/Gnu/gawk-3.1.1/
The other difference is that /usr/bin/sh on HP-UX in not Bourne but rather the POSIX sh which except fog very minior differences is the Korn sh. I've never found problems running ksh scripts under the POSIX shell but you can use ksh on HP-UX as well.
If it ain't broke, I can fix that.
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 2025 Hewlett Packard Enterprise Development LP