[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `missing' needs patch for Ultrix4.4
From: |
Akim Demaille |
Subject: |
Re: `missing' needs patch for Ultrix4.4 |
Date: |
19 Mar 2001 10:26:38 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
| Alexandre Oliva <address@hidden> wrote:
| | On Mar 17, 2001, Jim Meyering <address@hidden> 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, 2001/03/17
- Re: `missing' needs patch for Ultrix4.4, Alexandre Oliva, 2001/03/18
- Re: `missing' needs patch for Ultrix4.4, Jim Meyering, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4,
Akim Demaille <=
- Re: `missing' needs patch for Ultrix4.4, Jim Meyering, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Akim Demaille, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Jim Meyering, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Akim Demaille, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Jim Meyering, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Akim Demaille, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Jim Meyering, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Akim Demaille, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Jim Meyering, 2001/03/19
- Re: `missing' needs patch for Ultrix4.4, Alexandre Oliva, 2001/03/20