[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Password file with over 3000 users.

> Turbo Fredriksson wrote:
> >Actually, it's the other way around:
> >
> >>/dev/null 2>&1
> >
> >You first have to redirect STDOUT, then tell STDERR to go to STDOUT...

On 21.09.07 17:55, Andrew McGlashan wrote:
> I've heard that before many times, but the reverse has never failed me.

But that does not mean it is correct. At least it's probably not what you
wanted to do...

> >>2>&1 > /dev/null to end of command line.

this will redirect stderr to stdout, and then stdout to /dev/null, but
stderr will still be directed to the file stdout was directed to.

only (t)csh redirection >& or |& will redirect both stdout and stderr
together. you can't do that in (da)sh/bash/ksh

Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Microsoft dick is soft to do no harm

Reply to: