My script to kill the process contains just this
#!/bin/sh
kill -SIGKILL 3590
I get ./xx.sh: line 3: kill: SIGKILL: invalid signal specification
But the same command working fine in the shell and kill -9 3590 working fine in the script as well.
kill -KILL 3590killin Bash is a built-in; see Bash POSIX mode; one of the bullets identifies the SIG prefix as being supported bybashand not bysh. The external command probably doesn't support the SIG prefix.