I wanted to use kill --verbose ...
in a bash script but I got the error kill: -verbose: invalid signal specification
. This was weird as it worked fine in fish. My investigation has lead me to this weird behaviour:
$ which kill
/usr/bin/kill
$ sleep 5 & kill --verbose $!
[1] 33730
bash: kill: -verbose: invalid signal specification
... wait for sleep to finish ...
[1]+ Done sleep 5
$ sleep 5 & /usr/bin/kill --verbose $!
[1] 33964
sending signal 15 to pid 33964
[1]+ Terminated sleep 5
What is going on? Why does kill
not recognise the --verbose
flag, but /usr/bin/kill
does, when which kill
== /usr/bin/kill
?