bug-bash
[Top][All Lists]
Advanced

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

Re: Strange compgen behaviour


From: Greg Wooledge
Subject: Re: Strange compgen behaviour
Date: Fri, 25 Sep 2009 08:13:05 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Sep 24, 2009 at 03:05:07PM -0700, Mathias Dahl wrote:
> I did not find any generic way to quote/escape file names so I
> hardcoded some chars I know exist in my file names and used sed:

printf %q "$filename"

will either insert backslashes in front of all the shell metacharacters,
or $'...' quote the whole thing, or take some other action which renders
a string "safe".  It's basically the opposite of eval.




reply via email to

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