[net.bugs] CSH `...` command substitution brain damage; not really?

idallen@watmath.UUCP (07/18/84)

The first thing on a command line is expected to be a command word to CSH.  
It is the same sort of word as:

      echo hi >`expression`

CSH expects this word not to contain blanks; you can successfully say:

      `echo date`

but not:

      `echo echo hi`

This may be correct, since one wonders what:

      `expression` arg1 arg2 arg3 arg4

should do.  If <expression> expanded to multiple words, the supposed
args would not be the first ones passed to the command, just as:

      echo hi >`expression`

would not do what you expect if <expression> expanded to multiple
words, only the first of which was taken as the file name for redirection.
It's a case of the shell being conservative about peculiar constructions.

If you tell CSH to re-parse the stuff coming in from `...`, imbedded
blanks expand and your example works:

      eval `grep bleen /etc/rc`
-- 
        -IAN!  (Ian! D. Allen)      University of Waterloo