!# expansion in csh ( a puzzle )
Tim Smith
tim at callan.UUCP
Tue May 1 05:31:06 AEST 1984
/**/
Let "count" be a program that prints argc.
Let your shell be csh.
What would you expect from the following commands?
count
count !#
count !# !#
count !# !# !#
count !# !# !# !#
( you get the idea )
Hint: you will not get 1,2,4,8,16,...
I think I know why this happens. Is this a bug or a feature ( or a misuse
of !# ) ?
Tim Smith
{decvax,ucbvax}!ihnp4!sdcrdcf!trwrb!wlbr!callan!tim
{decvax,ucbvax,ihnp4,trwrb}!cithep!tim
More information about the Comp.unix.wizards
mailing list