|
| From: | James Youngman |
| Subject: | Re: Basename bug with directory spaces |
| Date: | Sun, 20 May 2007 10:30:18 +0100 |
On 5/20/07, John Cowan <address@hidden> wrote:
That's because $PWD is expanded into
/home/ben/My Stuff
by the shell, which is interpreted as two arguments: basename processes
only the first one. Try this:
$ basename "$PWD"
My Stuff
To underline and expand what John just wrote briefly, this is a property of the _shell_ not of basename. You might also want to read the section "EXPANSION" in the bash manpage. James.
| [Prev in Thread] | Current Thread | [Next in Thread] |