| Alexandre Oliva <[EMAIL PROTECTED]> wrote: | | On Mar 17, 2001, Jim Meyering <[EMAIL PROTECTED]> wrote: | | | | > * missing (--run): Use `eval' to run `"$@"'. Otherwise, Ultrix4.4's | | > /bin/sh fails and outputs garbage. | | | | Won't this evaluate the arguments one too many times? | | Thanks! You're right. | | | How about: | | | | prog=$1 | | shift | | $prog ${1+"$@"} && exit 0 I was about to suggest the same. | But wouldn't that'd have the same problem, in the unlikely event | that $1 contains shell meta-characters. How about this instead? Given that "$@" is expected to be valid a valid shell command, there should be no new problems, "$@" takes everything in charge. In addition, the idiom above is very common, so it must be sound.
- `missing' needs patch for Ultrix4.4 Jim Meyering
- Re: `missing' needs patch for Ultrix4.4 Alexandre Oliva
- Re: `missing' needs patch for Ultrix4.4 Jim Meyering
- Re: `missing' needs patch for Ultrix4.4 Akim Demaille
- Re: `missing' needs patch for Ultrix4.4 Jim Meyering
- Re: `missing' needs patch for Ultrix4.4 Akim Demaille
- Re: `missing' needs patch for Ultrix4.4 Jim Meyering
- Re: `missing' needs patch for Ultrix4.4 Akim Demaille
- Re: `missing' needs patch for Ultrix4.4 Jim Meyering
- Re: `missing' needs patch for Ultrix4.4 Alexandre Oliva
- Re: `missing' needs patch for Ultrix4.4 Akim Demaille
- Re: `missing' needs patch for Ultrix4.4 Jim Meyering
- Re: `missing' needs patch for Ultrix4.4 Akim Demaille
- Re: `missing' needs patch for Ultrix4.4 Jim Meyering