[Top][All Lists]

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

Re: >&2 vs. 1>&2

From: Eric Blake
Subject: Re: >&2 vs. 1>&2
Date: Tue, 19 Mar 2013 15:29:25 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

On 03/19/2013 03:20 PM, Karl Berry wrote:
> Is there a portability reason to use 1>&2 vs. just >&2 to redirect to stderr?
> I don't know of one, and don't see it mentioned in autoconf(Portable Shell).

As far as I know, all shells treat both as synonyms.  1>&2 is a bit more
explicit about what is happening, >&2 is faster to type.

> The gnupload script currently uses both.

Changing for consistency might be nice, but portability-wise, there is
no problem.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]