Hello Norman.

Norman Ramsey <[email protected]> wrote:
 |> [email protected] (Norman Ramsey) wrote:
 |>|I'm building s-nail from source.  But in the configuration step,
 |>|it mistakenly identifies /home/nr/bin/clang as a C compiler.
 |>|This script does not have its executable bit set, and therefor
 ...
 |>|it should not be treated as a candidate C compiler.
 |> 
 |> We use command -v, which should not return something for which no
 |> executable bit is set?
 |
 |Bletch.  Yet another bug in the Debian Almquist shell, which has been
 |the source of other problems:
 |
 |  nr@homedog ~/n/s-nail> ksh -c 'command -v clang'
 |  /usr/bin/clang
 |  nr@homedog ~/n/s-nail> bash -c 'command -v clang'
 |  /usr/bin/clang
 |  nr@homedog ~/n/s-nail> sh -c 'command -v clang'
 |  /home/nr/bin/clang
 |  nr@homedog ~/n/s-nail> dash -c 'command -v clang'
 |  /home/nr/bin/clang
 |  nr@homedog ~/n/s-nail> fish -c 'command -v clang'
 |  /usr/bin/clang
 |
 |I have filed a bug report against dash.
 |
 |> I cannot reproduce this?
 |
 |You will not be able to reproduce it except on a Debian or derivative
 |system where /bin/sh points to dash.

After Ralph's intervention i was able to reproduce this, and have
changed all use cases to a hand-written thing, namely

  thecmd() {
     fail=${1} pname=${2}
     oifs=${IFS} IFS=: 
     set -- ${PATH}
     IFS=${oifs}
     for path 
     do
        if [ -x "${path}/${pname}" ]; then
           echo "${path}/${pname}"
           return 0
        fi
     done
     [ ${fail} -eq 0 ] && return 1
     msg 'ERROR: no trace of utility '"${pname}"
     exit 1
  }

It will be in v14.9.4, hopefully this week.
Thanks again for reporting this, i am used to mksh!
Ciao,

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to