このシェル スクリプトから ID でプロセスを強制終了しようとしています。
# based on
# http://stackoverflow.com/questions/6437602/shell-script-to-get-the-process-id-on-linux
output=`ps -ax|grep Ad[o]be\ After\ Effects\ CS6`;
# set -- parses the ps output into words,
# and $1 is the first word on the line
# which happens to be the process ID
set -- $output;
pid=$1;
echo "I'm about to kill process " $pid;
killall -SEGV $pid;
しかし、それは私にその結果を与えます
No matching processes belonging to you were found
同じ ID を使用してスクリプトがエコーし、コマンドを直接実行すると、本来の処理が行われます。
kill -SEGV 50283
違いは何ですか?そして、スクリプトが「自分」のように動作するようにするにはどうすればよいですか (ユーザー権限のあるものだと思います)。