Re: compgen -f failing on directory containing single quote
From:
Freddy Vulto
Subject:
Re: compgen -f failing on directory containing single quote
Date:
Sun, 13 Dec 2009 15:17:41 +0100
User-agent:
Mutt/1.5.18 (2008-05-17)
On 091213 05:13, DennisW wrote:
> However, with quoting, these work:
>
> compgen -f "a\'b/"
> compgen -f 'a\"b/'
>
> or using a variable:
>
> dir="a\'b/"; compgen -f $dir
Both do not work at my machine? Are you sure you don't have a directory
`ab' besides `a\'b'? That's whap happened to me too...
It seems compgen is leaving out the quote out erroneously:
$ mkdir a\'b
$ touch a\'b/c
$ mkdir ab
$ touch ab/e
$ compgen -f a\'b/
ab/e # Should be a\'b/c
Freddy Vulto
http://fvue.nl