[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange compgen behaviour
From: |
Mathias Dahl |
Subject: |
Re: Strange compgen behaviour |
Date: |
Fri, 25 Sep 2009 05:20:58 -0700 (PDT) |
User-agent: |
G2/1.0 |
> 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.
Interesting! Can I make it part of my pipe (in place of `sed') or need
I change it to a for or while loop? This is what I have now:
files=$(find /home/mathias/Videos/movies/ -iname "*.avi" -type f -
printf "%P\n" | grep "${cur}" | sed "s/\\([][\\(\\) ,\']\\)/\\\\\\1/
g")
/Mathias
- Re: Strange compgen behaviour, (continued)
- Re: Strange compgen behaviour, Bernd Eggink, 2009/09/24
- Re: Strange compgen behaviour, Chet Ramey, 2009/09/24
- Re: Strange compgen behaviour, Bernd Eggink, 2009/09/24
- Re: Strange compgen behaviour, Chet Ramey, 2009/09/24
- Re: Strange compgen behaviour, Chris F.A. Johnson, 2009/09/24
- Re: Strange compgen behaviour, Chet Ramey, 2009/09/25
- Re: Strange compgen behaviour, Bernd.Eggink, 2009/09/25
- Message not available
- Re: Strange compgen behaviour, Mathias Dahl, 2009/09/24
- Re: Strange compgen behaviour, Mathias Dahl, 2009/09/24
- Re: Strange compgen behaviour, Greg Wooledge, 2009/09/25
- Message not available
- Re: Strange compgen behaviour,
Mathias Dahl <=
- Re: Strange compgen behaviour, Mathias Dahl, 2009/09/25
- Re: Strange compgen behaviour, Andreas Schwab, 2009/09/25
- Message not available
- Re: Strange compgen behaviour, Mathias Dahl, 2009/09/25
- Re: Strange compgen behaviour, Bernd Eggink, 2009/09/25
- Message not available
- Re: Strange compgen behaviour, Mathias Dahl, 2009/09/25
- Re: Strange compgen behaviour, Mathias Dahl, 2009/09/25