[comp.bugs.4bsd] A question of aliases...

dan@rna.UUCP (Dan Ts'o) (04/20/89)

	This has probably been answered a zillion times, but...

	Why doesn't the CSH alias:

	alias foo "echo $1 hello $2"

	give the expected results:

	% foo a b
	a hello b
	%

	Instead it gives:

	% foo a b
	hello a b
	%

	This is the result on 4.3BSD VAX, Ultrix 2.2 and some version of KSH.

	A friend wanted an alias of:

	% alias ff "find $1 -name $2 -print"

	but the best I could come up with was:

	% alias ff "find \!^ -name \!$ -print"

	Even \!1 and \!2 don't work (I guess they grab real events and not
alias args, but then why do \!^ and \!$ work ?).

	Please email responses. Thanks.


				Cheers,
				Dan Ts'o		212-570-7671
				Dept. Neurobiology	dan@rna.rockefeller.edu
				Rockefeller Univ.	...cmcl2!rna!dan
				1230 York Ave.		rna!dan@nyu.edu
				NY, NY 10021		tso@rockefeller.arpa
							tso@rockvax.bitnet