Spaces in Environment Variables

Eric Blake ebb9@byu.net
Sat Aug 27 21:43:00 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jesse Hogan on 8/27/2005 3:38 PM:
> If I set environment variables to paths that have
> spaces in them they don't work right with common shell
> commands. Does anybody know a work around for this?

Read up on shells; this problem is not unique to cygwin (although cygwin
tends to be more likely to expose it, since Windows is more likely to have
spaces in filenames).  Bash splits words on spaces after expanding
variables, unless the variables are double quoted.

> $ cd $PF

cd "$PF"

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
volunteer cygwin bash maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDEN5s84KuGfSFAYARAlf4AJ9IF5xvUpbaCJD/+q2unbBxaXCiKwCggDr0
B93BmvBkUwnkNKTMPDbzsdo=
=ymnC
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list