- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to copy stdin to stdout within a ksh scrip...
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
01-28-2005 12:54 AM
01-28-2005 12:54 AM
Starting with:
> progA | progB
What I want to do is run a script which will do some analysis on the output of progA, but will also pass progA's output to progB unaltered, so that my command look like:
> progA | myprog | progB
BTW, the output of progA is not in a text format.
Thanks,
Gary
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 01:04 AM
01-28-2005 01:04 AM
Re: How to copy stdin to stdout within a ksh script
maybe "tee" can help you.
progA | tee -a myfile | progB
cat myfile | myprog
regards,
Thierry.
- Tags:
- tee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 01:07 AM
01-28-2005 01:07 AM
Re: How to copy stdin to stdout within a ksh script
progA > myfile
cat myfile | myprog
cat myfile | progB
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 01:58 AM
01-28-2005 01:58 AM
Re: How to copy stdin to stdout within a ksh script
OK, let me go into a bit more detail...
I have an application which has a configuration file and in that configuration file, there is a variable called printCommand. Print command is currently:
xpr -device dj1200 | lp -oraw -dlp4650c1
When a print is kicked off within the application it prints a dump of the window by executing:
xwd | xpr -device dj1200 | lp -oraw -dlp4650c1
I.e. all I have to work with is the output from xwd and the ability to modify printCommand.
Now, for one class of users, the print fails and by inserting 'tee's I've found out that it's xpr where it's going wrong.
What I want to do is something along the lines of:
xwd | dump_environment_variables | xpr -device dj1200 | lp -oraw -dlp4650c1
for both sets of users so that I can see what's different in their environments.
I hope that clarifies my problem.
Thanks,
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 02:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 02:22 AM
01-28-2005 02:22 AM
Re: How to copy stdin to stdout within a ksh script
Can you explain how the round brackets figure in your example?
Thanks,
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 02:50 AM
01-28-2005 02:50 AM
Re: How to copy stdin to stdout within a ksh script
--Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2005 02:58 AM
01-28-2005 02:58 AM
Re: How to copy stdin to stdout within a ksh script
It worked a treat.
..and yes, the braces were needed!
Regards,
Gary