- Subject: Re: system and shell redirect
- From: Joerg Sommer <joerg@xxxxxxxxxxxx>
- Date: Mon, 17 Oct 2005 20:51:38 +0000 (UTC)
Hello Ethan,
Ethan Blanton <eblanton@xxxxxxxxxxxx> wrote:
> G. Milde spake unto us the following wisdom:
>> The ">&" construct is not mine. In the light of your responses, i assume
>> now: 1) my co-author uses a C shell, 2) it still works there, and 3) it
>> never worked right here but I did not realize.
>>
>> Jörgs idea with "which jed 2>&1 > /dev/null" works fine here.
>
> For the record, 'which jed > /dev/null 2>&1' will work in some places
> where your example does not. Welcome to the complexities of the
> bourne shell. ;-)
It should work nowhere. The commandline in parsed from left to right and
the first one (2>&1) says "double to file descriptor of 1 and bind it to
fd 2" and the second (>/dev/null) says "bind the file /dev/null to the
fd 1". So only your call is the right one.
Bye, Jörg.
--
Diskutiere nie mit einem Idioten:
Sie ziehen Dich auf ihr Niveau herab und schlagen Dich dann mit
Erfahrung.
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]