[Top][All Lists]

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

Re: >&2 vs. 1>&2

From: Paul Eggert
Subject: Re: >&2 vs. 1>&2
Date: Wed, 20 Mar 2013 16:03:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

On 03/20/13 14:22, Bruno Haible wrote:
> I'm not aware of any portability problem here.

Nor I.

> It's more a question of style. I use 1>&2 and 2>&1 quite frequently, and would
> find it odd to omit the '1' in one case but not in the other case.

My style (and it is just style) is the reverse.
I find the general I>&J syntax to be confusing.
I use ">&2" more often, and the syntax in
"printf ... >&2" works better to remind me that
it's like "printf ... >/dev/stderr" but is more portable.
I use "2>&1" less often, and the fact that "2>&1" is a bit more
verbose helps to remind me that it's the less common case;
this helps overcome some of my confusion.

reply via email to

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