- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell programming
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
02-17-2002 09:25 PM
02-17-2002 09:25 PM
I have written the script on hp-ux 10.20, which includes "tar cvf" command. This script is started by cron using the string which redirects stdout to "> /dev/pts/0"-everything to X-terminal of CDE. Everything is OK but tar command doesn't stdout anything.So how can I stdout the protocol of tar command to /dev/pts/0 ?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2002 09:30 PM
02-17-2002 09:30 PM
Re: Shell programming
/dev/pts/0 is assigned dynamically to the terminal which connects to the system. so when you try to redirect the output of the tar command to /dev/pts/0 there should be someone connected to the system using the port /dev/pts/0.
Normally we redirect output of the commands to a file, that makes it easy to keep track of any errors.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2002 09:53 PM
02-17-2002 09:53 PM
Re: Shell programming
Remember that tar spews it "output" onto stderr, not stdout.
You may want to try redirecting the standard error (2) instead of standard output (1)
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2002 12:20 AM
02-18-2002 12:20 AM
SolutionThe standard out of tar is channel 2 (normally standard error), so try the following:
script_name >/dev/pts/0 2&>1
using this way, you first redirect the output of all other commands to standard output, and the output of the tar- command is also redirected to the same terminal.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2002 12:26 AM
02-18-2002 12:26 AM
Re: Shell programming
No offence but I think there is a small typo in your response. It should be:
script_name >/dev/pts/0 2>&1
Hope this helps. Regards.
Steven Sim Kok Leong