# 输入项目名称  类似python input
#echo "Input name of the project"


#fruits=("requests_asin_competitive_8.py" "Poll_site_spider.py" "all_site_asin_detail_9.py" "h4_asin_detail.py" "linux_spider_asin.py" "Poll_site_spider_pg.py" "site_search_term.py")

fruits=("amazon_comment")
for i in "${fruits[@]}"; do
    PID=$(ps -ef | grep $i | grep -v grep | awk '{print $2}')
    for k in "${PID[@]}"; do
        echo "id $k"
        kill -9 $k ;
    done;
    echo "pid: $PID ---"
done
#chmod +x k_spider.sh

#30 23 * * * cd /mnt/hezhe && ./k_spider.sh > ki.log 2>&1 &

#cd /mnt/hezhe && ./k_spider.sh > ki.log 2>&1 &


# cd /mnt/hezhe/amazon_spider/amazon_spider && ./k_spider.sh > ki.log 2>&1 &