🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #150

n>&m redirection and alias expansion in bash 1.01

#150
From: J. Michael Berkley
Date: Mon, 26 Jun 1989 22:49
23 lines
1028 bytes
I am still having trouble with	

	foo 2>&1 > foo.out

I was always getting the error message:

	syntax error near `&%1'

With the help of an inciteful friend, I discovered that the problem
is with some of my favourite aliases:

	alias 1='%1'

It seems that bash does alias expansion after "&" even though the "&"
doesn't indicate a background job.

 Mike Berkley, University of Waterloo
 PAMI Lab
 jmberkley@watnext.waterloo.edu
 {utai,uunet}!watmath!watnext!jmberkley

PS - This is on a uVax running Ultrix and bash 1.01 compiled with
bison and gcc.
Technical Details
Message-ID: <JMBERKLEY.89Jun26184904@watnext.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!watcgl!jmberkley

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!watcgl!jmberkley
From: jmberkley@watnext.waterloo.edu (J. Michael Berkley)
Newsgroups: gnu.bash.bug
Subject: n>&m redirection and alias expansion in bash 1.01
Message-ID: <JMBERKLEY.89Jun26184904@watnext.waterloo.edu>
Date: 26 Jun 89 22:49:04 GMT
Sender: daemon@watcgl.waterloo.edu
Reply-To: jmberkley@watnext.waterloo.edu
Distribution: gnu
Organization: University of Waterloo, Waterloo, Ontario, Canada
Lines: 23