csh metacharacter bugs
utzoo!decvax!cca!hplabs!hao!menlo70!sytek!zehntel!teklabs!tekcrd!archiel at sri-unix
utzoo!decvax!cca!hplabs!hao!menlo70!sytek!zehntel!teklabs!tekcrd!archiel at sri-unix
Wed Nov 17 14:55:52 AEST 1982
I have encountered two csh bugs that have not, to my
knowledge, been described on the net before. The first one
concerns double quote escapes and built-in commands.
Enclosing a command in double quotes ("...") causes the
error "Command not found" if it is a built-in command. I
have cd (chdir) aliased to change my prompt. I got into
trouble when I double quoted it to turn off the aliasing as
in
alias cpd '("cd" \!:1; tar cfp - .)|("cd" \!:2; tar xfp - .)'
For those of you that do not understand the implications of
this, cpd as defined above effectively trashes all the files
in the directory where it is executed and in all of its
sub-directories. Caveat emptor.
The second bug is an interesting one concerning meta-
characters. If you have several file names that begin with
a metacharacter, > for example (don't ask me why, they came
from a non-Unix system), you might try to edit one of them
using
vi \>name
This works fine. Suppose you try to edit them all with one
command, i.e.,
vi \>*
Instead of entering vi, you get the message "No match" from
csh. If you try
vi `echo \>\*`
it works as expected.
If anybody has an explanation and/or reason for either
of these "bugs," please send it to me via mail. I have not
been able to find any explanation for either of them in the
documentation.
Archie Lachner
...teklabs!tekcrd!archiel
archiel.tektronix at rand-relay
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list