Escaping spaces in arguments to shell script

Bill Ricker bill.n1vux at gmail.com
Fri Apr 28 23:55:04 EDT 2006


> > Moreover, read in bash(1) difference between doublequotes (") and single
> > quotes (') -- contrary to other languages (Python) they are not the same

> This is generally true for all the shells going back to Bourne.

And the many CSH variants, and Perl, and C before them all.

If Python truly has " and ' do the same thing, it's the oddball -- but
then it's all the more important to warn Python-ers that other
languages use different quotes for different things when they leave
Guido's Way.

(There are some dialects of SQL that allow either instead of picking
one, but it's vendor-specific.)

Of course, putting junk in filenames is an abomination. Just because
many modern filesystems allow anything but Unicode NUL in a filename
doesn't mean you (or MS Word) should put spaces there. Unix open(2)
used to prevent you from creating files with ' ' or '/', but I fear it
only blocks '/' now ?   Why did MS have to steal even the things the
MAC did WRONG ?

--
Bill
n1vux at arrl.net bill.n1vux at gmail.com



More information about the Discuss mailing list