Flame about shell metacharacter expansion

utzoo!decvax!ucbvax!menlo70!sri-unix!pur-ee!malcolm at Berkeley utzoo!decvax!ucbvax!menlo70!sri-unix!pur-ee!malcolm at Berkeley
Wed Dec 30 23:31:51 AEST 1981


I was hoping the discussion about the shell passing the unexpanded command
line to the program would die a natural death but the comments by
yale-comix!bj were the last straw for me.  I hate to dignify the idea but
many of the bad points have not been mentioned.

As a user:
	One of the beauties of UNIX is its clean architecture.  For example
	I can use a program that writes output, irregardless of the my stty
	settings.  Each module of UNIX (file system, process control, command
	interpreter, etc.) does one thing and does it well.  Not only does
	it make it easier to do things, it is much easier to learn.  Letting
	a program see the unexpanded command line is like passing the buck.
	To put this arguement on a simpler level...The last thing that I want
	is for the command interpreter to expand the magic characters and 
	then some nincompoop (sp?) program to decide that the shell did
	it all wrong and do just the opposite.

As a programmer:
	I have seen four different shells since I started playing with
	UNIX (Maschey(v6), Bourne (v7), Joy(Berkeley), and a novice 
	shell).  I really don't want to try to properly handle
	multiple shells and their various syntax.  I hate to even think
	about what I would have to do with the new "shells in an editor"
	(EMACS?).

I guess the moral of the story is let the command interpreter (shell)
do its job.  If you don't like it use a different shell.

						Malcolm Slaney
						ihuxi!pur-ee!malcolm
						ucbvax!pur-ee!malcolm
						pur-ee!malcolm at Berkeley

P.S.  I know people will argue that the no expand feature is needed
to prevent things like "rm *."  Is it really such a good idea to mess
up all the beauty of UNIX when so many better solutions exist.  For the
above I suggest
	if (user_is_a_munchkin && number_of_files_to_delete > 2){
		printf("Are you sure??????? ");
	and so on.....



More information about the Comp.unix.wizards mailing list