Redirection 2>&1 or ...?
From: Rex Gustavus Adolphus (uffesterner_at_spamhole.com)
Date: 04/30/04
- Next message: David M. Sueme: "Re: Linux-Bashing Sites ?"
- Previous message: Stefan Viljoen: "Re: usb flash memory"
- Next in thread: P.T. Breuer: "Re: Redirection 2>&1 or ...?"
- Reply: P.T. Breuer: "Re: Redirection 2>&1 or ...?"
- Reply: moma: "Re: Redirection 2>&1 or ...?"
- Reply: Nick Landsberg: "Re: Redirection 2>&1 or ...?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Apr 2004 00:44:30 -0700
Hi
Is there any difference in the resulting output if you use:
command 1>output 2>&1
or
command 1>output 2>output
?
I tried it myself with a simple shellscript:
#!/bin/sh
ls
lsk
(where lsk is an invalid command)
In the first case I got the errormessage last in output
and in the second case I got it first.
- Next message: David M. Sueme: "Re: Linux-Bashing Sites ?"
- Previous message: Stefan Viljoen: "Re: usb flash memory"
- Next in thread: P.T. Breuer: "Re: Redirection 2>&1 or ...?"
- Reply: P.T. Breuer: "Re: Redirection 2>&1 or ...?"
- Reply: moma: "Re: Redirection 2>&1 or ...?"
- Reply: Nick Landsberg: "Re: Redirection 2>&1 or ...?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]