in reply to Re^2: Deleting an Odd Filename
in thread Deleting an Odd Filename
That would be the most natural solution, IMHO (when using the shell). Like Perl, most Unix shells interpolate variables ($dept) in double-quoted strings, while leaving them alone when single quotes are being used.
The only case I'm aware of where this doesn't work (except when having single quotes in the name itself) is when you have a leading dash in the file name, like '-foo':
$ rm '-foo' rm: invalid option -- o Try `rm ./-foo' to remove the file `-foo'. Try `rm --help' for more information.
But, as you can see, rm is being helpful (at least some versions of it on Linux) by suggesting the workaround for this special case, i.e. rm ./-foo
|
|---|