- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- more header
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
07-27-2006 02:32 AM
07-27-2006 02:32 AM
:::::::::::::::::::::::::::
/full/path/to/file/filename
:::::::::::::::::::::::::::
This is causing some of the piped commands to go haywire as they are not looking for that header. I'm recoding to handle this as it's a bug in the general portability of the script, but can anyone tell me where one configures more to pre-pend such a header and if this feature can be turned off ? I have not seen this previously on other HPUX or AIX boxes. BTW if you run more from the command line, and pipe it to sed, etc. it does not do this. It seems to happen only when run from the script.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2006 02:42 AM
07-27-2006 02:42 AM
SolutionThe first thing I would do is examine the 'more' file and see what it looks like. In HP-UX you should be using /usr/bin/more and if you do a 'file /usr/bin/more' you should see it as 'PA-RISC 1.1 shared executable' and if you do a 'what /usr/bin/more'' you should see some HP revision information.
Now, in your script are you just doing a 'more' or are you doing a '/usr/bin/more'? It is ALWAYS a good practice to use fully qualified paths to executables so you don't run into surprises.
If you must make sure this is portable then you could add something like this to your script:
OS=$(uname)
case ${OS} in
HP-UX) MORE=/usr/bin/more ;;
AIX) MORE=/path/to/more ;;
esac
${MORE} somefile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2006 02:50 AM
07-27-2006 02:50 AM
Re: more header
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2006 04:31 AM
07-27-2006 04:31 AM
Re: more header
"If the standard output is not a terminal, more acts just like cat, except that a header is printed before each file in a series."
My problem is solved by just switching over to cat, which causes the header issue to go away. Your help with this is very much appreciated. I should have been using cat all along anyway, as my need is to write out entire files to other piped processes such as sed, and not to page through files.
Also odd to note that I have run this same script on other UNIX servers using "more" (both HPUX and AIX) and did not get the headers and yet this one gives them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2006 04:49 AM
07-27-2006 04:49 AM
Re: more header
--- And while we are on the subject of more, here is a true epitaph on both less and more:
Here lies Lester Moore.
Four slugs
From a forty-four.
No Les
No More.
Boot Hill Cemetery, Tombstone, Arizona
-------------------------------
Les would have probably been better off if he used pg as well.