[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Parameter Expansion] bug in ${variable% *}
From: |
Greg Wooledge |
Subject: |
Re: [Parameter Expansion] bug in ${variable% *} |
Date: |
Tue, 12 Feb 2013 08:16:14 -0500 |
User-agent: |
Mutt/1.4.2.3i |
On Mon, Feb 11, 2013 at 06:50:49PM +0100, Dashing wrote:
> $ ./pe 'mplayer foo1\ foo2\ foo3\ 4\ 5\ foo6\ 7'
> :--Mistake--:
> :--Mistake--:
Whatever you're doing, it's wrong.
./pe mplayer foo1\ foo2\ foo3\ 4\ 5\ foo6\ 7
#!/bin/bash
prog=$1
shift
exec "$prog" extra args go here "$@"
THAT is how a wrapper should be done. Do not combine a program and its
arguments all together into a single argument and then try to parse it
apart.
- [Parameter Expansion] bug in ${variable% *}, Dashing, 2013/02/12
- Re: [Parameter Expansion] bug in ${variable% *}, Dashing, 2013/02/12
- Re: [Parameter Expansion] bug in ${variable% *}, Bernd Eggink, 2013/02/12
- Re: [Parameter Expansion] bug in ${variable% *}, Dashing, 2013/02/12
- Re: [Parameter Expansion] bug in ${variable% *}, Bernd Eggink, 2013/02/12