bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compgen -f failing on directory containing single quote


From: DennisW
Subject: Re: compgen -f failing on directory containing single quote
Date: Sun, 13 Dec 2009 05:13:47 -0800 (PST)
User-agent: G2/1.0

On Dec 13, 4:07 am, Freddy Vulto <address@hidden> wrote:
> `compgen -f' produces no output if the directory contains a single quote.
> I get the same result on both bash-3.2.39 and bash-4.0.35.
>
> Steps to reproduce the problem:
>
>     $ mkdir a\'b
>     $ touch a\'b/{c,d}
>     $ compgen -f a\'b/
>     $
>
> Expected output:
>
>     a\'b/c
>     a\'b/d
>
> Freddy Vultohttp://fvue.nl

Same behavior with a double quote.

However, with quoting, these work:

compgen -f "a\'b/"
compgen -f 'a\"b/'

or using a variable:

dir="a\'b/"; compgen -f $dir


reply via email to

[Prev in Thread] Current Thread [Next in Thread]