This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Reg: dirname
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Brian Dessent on 4/11/2008 4:06 AM:
| If you really want a Win32 path you need to use cygpath, e.g.
|
| echo $(dirname "$(cygpath -m "$0")")
Still not portable - what if the name contains two consecutive spaces, or
starts with '-n'? This is even better:
printf '%s\n' "$(dirname "$(cygpath -m "$0")")"
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkf/VYAACgkQ84KuGfSFAYCdegCgyNUt/uemzbO4SwrExehHQg4c
OrwAoLL6MUS/Es/s0L3mfBEczdKlqJvi
=p+jW
-----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/