- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: show column in script
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
11-27-2007 06:39 PM
11-27-2007 06:39 PM
the result
======
04/15/07 01:00:00 1 8 7 8 5 8 4 5 5 7
04/15/07 02:00:00 1 2 58 7 5 6 4 1 8
"
"
"
(total 1500 lines )
My program
=======
#vi /tmp/my_program
#/bin/ksh
/tmp/my_script <
sleep
1
EOF
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 07:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 08:04 PM
11-27-2007 08:04 PM
Re: show column in script
for my first question , why it only show the page 1 , it is because it is wait to press "enter" key to next page , can advise if I want to add the "enter" command to my program , what can i do ? thx
#vi /tmp/my_program
#/bin/ksh
/tmp/my_script <
1
"enter"
"enter"
sleep 1
1
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 08:14 PM
11-27-2007 08:14 PM
Re: show column in script
Ideally, your program should just dump 1500 lines and let the caller pipe it through more if he wants paging or though awk if he wants to select columns.
But with your "sleep" inputs, it seems you want it to wait before some output?
If you don't want it to stop after a page, it seems the best thing to do to your application is to pass a flag (or set and env var), to say you don't want paging.
>it is because it is wait to press "enter" key to next page, can advise if I want to add the "enter" command to my program, what can i do?
I assume you just have ~1500/60 blanks lines to simulate the ENTER key.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 08:28 PM
11-27-2007 08:28 PM
Re: show column in script
But with your "sleep" inputs, it seems you want it to wait before some output? << - no, I set "sleep" only want it run more smoothly ( i guess it is the case ) , please ignore it.
If you don't want it to stop after a page, it seems the best thing to do to your application is to pass a flag (or set and env var), to say you don't want paging --> please advise how to set this env ?
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 09:10 PM
11-27-2007 09:10 PM
Re: show column in script
My suggestion was to change your application to detect a new command line option and do things differently. Or call getenv(3) to detect you don't want to do paging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 03:12 PM
11-28-2007 03:12 PM
Re: show column in script
My suggestion was to change your application to detect a new command line option and do things differently. Or call getenv(3) to detect you don't want to do paging. -->
sorry , I am not too understand , can you please advise what I need to do ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 03:23 PM
11-28-2007 03:23 PM
Re: show column in script
Can you change your application? Do you have the source and know how to build it?
I.e. you don't like how it works, can you change it so you can get all those 1500 lines?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 06:12 PM
11-28-2007 06:12 PM
Re: show column in script
--> this is third party program , we don't have source code .
I.e. you don't like how it works, can you change it so you can get all those 1500 lines?
--> I can get all those 1500 lines but the application need to press "enter" key when I want go to next page ( 1500 lines have many pages ) , so I want to ask how to add the enter to my program , just like some unix key ^M etc.
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2007 08:20 AM
11-29-2007 08:20 AM
Re: show column in script
So my suggestion isn't applicable.
>so I want to ask how to add the enter to my program, just like some unix key ^M etc.
Basically having blank lines in your here document will act the same as an enter key.
In the places above where you had "enter".