C-shell puzzles

David R. Stampf drs at bnl.UUCP
Thu Nov 14 13:02:42 AEST 1985


For all of you C-shell fans - heres a couple of bugs/puzzles.  (I don't know
the answer to the second.)

The following alias should give a directory listing of the files which have a
specified pattern in the middle.  It only works if the pattern is at the end.

	alias lm 'ls -l *\!**'

Its easy to make it work, but I think that the above is acceptable.

The next has to do with how do you run a command which has nested command
substitutions?  From what I can see, you cannot.  I would love to be able
to type (in a more complicated shell script and using any amount of quoting
necessary)

	echo `echo `date``

but no amount of quoting seems to satisfy the shell.  Any ideas?  (I know -
RTFM, but I have grepped sh and csh for nest, recurs, ... and have come up
empty.)  Any suggestions would be appreciated.  Both problems exist on
Suns and Ultrix 1.0.



More information about the Comp.unix.wizards mailing list