このスクリプトを作成しましたが、ジョブ -ls および ps|grep を実行しても結果が得られません。これが私のスクリプトです。
#!/bin/bash
trap 'echo -e "kill Command given \n";exit 2'SIGINT SIGTERM
count=1
echo "start of the program"
while [ $count -le 10 ]
do
echo "Loop #${count}"
sleep 10
count=$[ count + 1 ]
done
echo "end of program"