Subject: Re: rmdir(".")
To: Roland Illig <rillig@NetBSD.org>
From: Ben Collver <collver@peak.org>
List: tech-kern
Date: 09/09/2005 07:05:51
On Fri, Sep 09, 2005 at 03:26:47PM +0200, Roland Illig wrote:
> Ben Collver wrote:
> >There is no need to quote command expansion, so your original example
> >was whitespace safe.
> >
> >$ mkdir "dir a" && cd "dir a"
> >$ sh -c 'foo=$(pwd); echo $foo'
> >/home/ben/dir a
> 
> You're comparing apples with oranges here. Alan wrote:
> 
>   rmdir $(pwd)
> 
> and you wrote:
> 
>   foo=$(pwd); echo $pwd
> 
> You know that the quotes are not needed with variable assignments, do 
> you? That's the difference here.

Thanks for the correction.

Looking through my scripts directory, I found a couple faults due to
this misunderstanding. ie: if [ -f $(basename "$URL") ]

Cheers,

Ben