GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: different syntax for closing standard error?
Operating System - HP-UX
1846649
Members
2767
Online
110256
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
03-03-2004 08:03 AM
03-03-2004 08:03 AM
different syntax for closing standard error?
I tried the above with ksh on a sun box, and found it would not work. Apparently &1 is closed and thus cannot be referred to?
this worked for me:
$ grep abcd /abcd >&- 2>&-
$
this did not:
$ grep abcd /abcd >&- 2>&1
ksh: 1: bad file unit number
$
cheers!
this worked for me:
$ grep abcd /abcd >&- 2>&-
$
this did not:
$ grep abcd /abcd >&- 2>&1
ksh: 1: bad file unit number
$
cheers!
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 08:06 AM
03-03-2004 08:06 AM
Re: different syntax for closing standard error?
Arg.
sorry. I set this as a reply to an existing question, but upon 'registration' the web site lost the pointer and simply made a new message/subject out of it.
sorry. I set this as a reply to an existing question, but upon 'registration' the web site lost the pointer and simply made a new message/subject out of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 08:59 AM
03-03-2004 08:59 AM
Re: different syntax for closing standard error?
instead of:
$ grep abcd /abcd >&- 2>&1
did you try
$ grep abcd /abcd 2>&1 >&-
$ grep abcd /abcd >&- 2>&1
did you try
$ grep abcd /abcd 2>&1 >&-
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP