[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure: error: cannot find install-sh, install.sh, or shtool in "
Re: configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
Sun, 2 Aug 2020 11:47:23 -0400
On 2020-08-01, TomK <firstname.lastname@example.org> wrote:
> Thanks very much Karl. Appreciate this feedback. You've answered alot
> of the lingering questions I had around this topic. Much appreciated!
> Just for some continued open discussion, included some basic answers.
> Not meant to sway to one side or the other, just to understand reasoning
> behind what I see used.
> On 7/30/2020 5:05 PM, Karl Berry wrote:
>> I don't agree with "deprecated". Left quotes must continue to work
>> forever and there is every reason to use them, in shell code that must
>> be maximally portable.
> for i in `find /usr/include -type f `
> fails on very large results. $() has a higher results limit.
This is the least of your problems with this construct. It will also
perform word splitting and pattern expansion on the filenames, which is
almost certainly not intended or desired so if you need to do something
like this in a configure script it is probably better to find a portable
construct which does not have these problems (I suspect such a solution
will not use command substitution at all).
Even if $() was portable it does not improve things very much; consider
% mkdir /tmp/cwd
% echo hello >/tmp/cwd/totally_unrelated_file
% cd /tmp/cwd
% mkdir /tmp/test
% mkdir /tmp/test/not_even_a_file
% echo hello >'/tmp/test/* *'
% for i in $(find /tmp/test -type f); do printf '%s\n' "$i"; done