[gnu.bash.bug] Re^2: n>&m redirection and alias expansion in bash 1.01

maart@cs.vu.nl (Maarten Litmaath) (06/28/89)

lamy@ai.utoronto.ca (Jean-Francois Lamy) writes:
\jmberkley@watnext.waterloo.edu (J. Michael Berkley) writes:
\
\>	foo 2>&1 > foo.out
\
\(Independently of the problem with aliases): you should be saying
\
\	foo > foo.out 2>&1 
\
\if you want to follow "sh" usage (and bash usage if it follows sh semantics
\for redirection).  Order of indirection does matter.

Precisely! What if Michael wanted to dup stderr to the original stdout and
redirect stdout to a file?
-- 
"I HATE arbitrary limits, especially when |Maarten Litmaath @ VU Amsterdam:
   they're small."  (Stephen Savitzky)    |maart@cs.vu.nl, mcvax!botter!maart

jmberkley@watnext.waterloo.edu (J. Michael Berkley) (06/29/89)

lamy@ai.utoronto.ca (Jean-Francois Lamy) writes:
   \if you want to follow "sh" usage (and bash usage if it follows sh semantics
   \for redirection).  Order of indirection does matter.

In article <2809@solo3.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes:
   Precisely! What if Michael wanted to dup stderr to the original stdout and
   redirect stdout to a file?

Argh.  I am thankful to everyone who has pointed out that my ordering
was incorrect, but the real problem is with bash and incorrect alias
expansion.  Ordering is not very important when bash is giving syntax
errors because of an alias.