From: Eze on
Thank you, Sven; it makes more sense now. Do you think the changes
dash made with respect to ash had POSIX compliance in mind?
From: André Gillibert on
Eze <garzon.lucero(a)gmail.com> wrote:
> Thank you, Sven; it makes more sense now. Do you think the changes
> dash made with respect to ash had POSIX compliance in mind?

That's a corner case.
With the current wording, dash behavior seems to be right:
<http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html> (see Introduction)

Redirection is supposed to be performed after Word Expansions but before searching/executing the command.

Note that syntax errors during or before Words Expansion should emit error messages before stderr redirection.
Example:
2>/dev/null <&&

Outputs (on stderr):
dash: Syntax error: "&" unexpected
From: Eze on
Thanks, André. As I play with more distributions I get a bit more
lost. I just looked up my Linux sh man pages (dash), and it starts
with "BSD General Commands Manual", while the FreeBSD version (I can
now see the man pages with Freesbie) reads "FreeBSD General Commands
Manual".

I thought BSD no longer existed as a coordinating body, but the dash
man pages are from January 2003 (that is, fairly recent). If it does
exist, I would imagine FreeBSD would use that documentation, not a
separate "FreeBSD Manual". Go figure. (I'm badly digressing... No need
to answer.)
First  |  Prev  | 
Pages: 1 2
Prev: "tr" Command Behaviour
Next: Numeric Keypad in VI