- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to use these syntax?
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
10-13-2003 03:00 PM
10-13-2003 03:00 PM
It shows an example like this(not remember clearly):
[program name] $1 $2 2>/dev/null 2>/dev/null |&
(Pls. focus on the last three syntaxs)
Two questions:
Why it uses double "2>/dev/null" ?
How to use "|&" ?
I really not understand the meaning from the book. Can anyone tell me how to use it or give me a link? It is desirable if you can give me an example.
Thank you very much.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 05:26 PM
10-13-2003 05:26 PM
Re: How to use these syntax?
units |&
This will start the units program as a co-process. All this means is that your script and, in this case, units run at the same time but the exciting thing is that a two way pipe is set up between your script and the command (units in this case). Doesn't sound too exciting yet but all this means you can write to units using "print" and read from it using "read -p". So your script can go "print inches\ncentimetres" and then a read -p will give you the result of converting inches to centimeters courtesy of the units application. A. Clay Stephenson introduced me to the concept of using "bc" as a co-process to do complex math within a script. Something I had never even begun to consider!
I have never seen the double "2>/dev/null" but I imagine that it re-directs the standard error of both processes to /dev/null.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 06:07 PM
10-13-2003 06:07 PM
Re: How to use these syntax?
Actually I am not fully understanding the meaning. Do you know any materials related to this issue from the web?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 06:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 06:56 PM
10-13-2003 06:56 PM
Re: How to use these syntax?
Thanks again!