Bum behaviour of hash(1)

2014-08-01 Thread Steffen Nurpmeso
Hello,

just stumbled over a makefile which does

  RANLIB=(hash ranlib) /dev/null 21 || exit 0; ranlib

and had a problem:

  ?0[]$ for i in ba da k mk z; do
 echo --${i}sh:;
 eval ${i}sh -c '(hash nosuch)||echo ok; (hash vim)||echo bad';
   done 
  --bash:
  bash: line 0: hash: nosuch: not found
  ok
  --dash:
  dash: 1: hash: nosuch: not found
  ok
  --ksh:
  --mksh:
  --zsh:
  zsh:hash:1: no such command: nosuch
  ok

And also (packed in shell archives, grmpf)

  ?1[]$ bourne.sh + -c '(hash vim)||echo au'
  ?0[]$ bourne.sh + -c '(hash vims)||echo au'
  /var/folders/Da/DaZX3-k5G8a57zw6MSmjJTM/-Tmp-//.bournesh/sh: vims: not 
found
  au
  ?0[]$ schily.sh + -c '(hash vim)||echo au'
  ?0[]$ schily.sh + -c '(hash vims)||echo au'
  /var/folders/Da/DaZX3-k5G8a57zw6MSmjJTM/-Tmp-//.schily.sh/sh: vims: not 
found
  au

Ciao,

--steffen


Re: Bum behaviour of hash(1)

2014-08-01 Thread Thorsten Glaser
Steffen Nurpmeso dixit:

just stumbled over a makefile which does

Fix that Makefile.

bye,
//mirabilos
-- 
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh


Re: Bum behaviour of hash(1)

2014-08-01 Thread Steffen Nurpmeso
Thorsten Glaser t...@mirbsd.de wrote:
 |Steffen Nurpmeso dixit:
 |
 |just stumbled over a makefile which does
 |
 |Fix that Makefile.

Your advice comes too late.
Sorry for that.
Ciao,

--steffen