Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Escaping spaces in arguments to shell script



> > 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




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org