On 2010-05-14 11:47 +0200, Ralf Mardorf wrote:

> File names are allowed to use any sign excepted the /, NUL, * and ? in 
> Linux file names.

Unix forbids exactly two characters in file names : NUL and "/".
"*" and "?" are legal ; they just need to be quoted or escaped if
they appear on a shell command line. Just like white space, ";",
"(", ")", "|", "<", ">", "&", and a few others.

The problem is that many shell scripts don't bother quoting
variable references. Whenever you see stuff like

  cp -p $foo $1

in a shell script, you have a (latent) bug. That should be written

  cp -p -- "$foo" "$1"

The "--" is important. It tells cp that the following arguments
are not to be treated as options, even if they look like one (i.e.
begin with a "-"). The "--" convention is not specific to cp, by
the way. It works with any program that parses its command line
with getopt, i.e. most of them.

-- 
André Majorel http://www.teaser.fr/~amajorel/
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users

Reply via email to