Re: do shell script without blocking?
Re: do shell script without blocking?
- Subject: Re: do shell script without blocking?
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 16 Feb 2005 09:58:36 -0800
According to "Unix Power Tools" (O'Reilly), p. 756, the 2>&1 is used here by
bash and tcsh (but not csh) to mean "send standard error (file descriptor 2)
to the same place standard output (file descriptor 1) is going". I.e., it
relieves you from having to know or specify _where_ stdout is going. You
don't need to create a temporary file or anything else. Wherever stdout goes
(in this case, back to the script result) stderr will go too.
--
Paul Berkowitz
> From: Stephen Jonke <email@hidden>
> Date: Wed, 16 Feb 2005 11:43:19 -0500
> To: AppleScript <email@hidden>
> Subject: Re: do shell script without blocking?
>
> What does the & mean in that context? 2>&1 as opposed to 2>1?
>
> Steve
>
> On Feb 16, 2005, at 10:24 AM, Martin Orpen wrote:
>> 1 = stdout (output)
>> 2 = stderr (error)
>>
>> 2>&1 sends ouput 2 to the same destination as output 1
>>
>> You'll often see that 2 (and sometimes 1) is redirected to /dev/null
>> which
>> is also known as the bitbucket and means that you don't get bothered by
>> error messages littering your logs and script output.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden