shell 执行脚本

#!/bin/bash
echo 'begin...'
echo 'start_logistics_trends_sf'
ssh -o StrictHostKeyChecking=no root@10.1.4.231 "/opt/logistics/start_logistics_trends_sf.sh > /opt/logistics/logs/start_logistics_trends_sf.log"
result=$?
echo $result
echo 'done...'
if [ $result -eq 0 ];then
    echo 'success!'
    echo `date`
    exit 0
else
    echo 'error'
    exit 1
fi
echo `date`

  

posted @ 2020-09-17 17:03  逐梦~前行  阅读(144)  评论(0)    收藏  举报