Answer to Excersise 1

The reason is because # is the comment character of a shell. This means that after removing comments from the line the shell will see the line
rm
which will result in an error message as rm expects arguments.

The solution to this problem is to use quoting to prevent the shell from removing the comment. Any of the following two line will work fine.

rm '#foo.c#' rm "#foo.c#"
If you are lucky, the shell will automatically quote the string for you (e.g. bash will quote a word if you expand it using TAB).
Matz Kindahl <matkin@docs.uu.se>
Last modified: Thu Oct 19 15:57:44 1995