[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Capturing STDERR in ksh.
- From: Matthew Miller <mattdm mattdm org>
- To: rpm-list redhat com
- Subject: Re: Capturing STDERR in ksh.
- Date: Fri, 27 Jul 2001 11:44:11 -0400
On Fri, Jul 27, 2001 at 04:12:50PM +0100, William Lupton wrote:
> Paul Sullivan wrote:
> > i.e. rpm --checksig example.rpm 2>&1 >/dev/null
> The re-directions are processed in order; put "2>&1" last
This seemed non-intuitive to me at first; the first line above seemed "in
order" to me: as I naturally read it, it says:
1. combine standard error into standard output
2. send standard output (including standard error) to /dev/null
Obviously, that ain't right. It actually says:
1. send standard error to wherever standard out is going now (the terminal)
2. send standard out to /dev/null
So, what's wanted is:
1. send standard out to /dev/null
2. send standard error to wherever standard out is going now (/dev/null)
Which is:
rpm --checksig example.rpm >/dev/null 2>&1
Hope that helps. :)
--
Matthew Miller mattdm@mattdm.org <http://www.mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]