标签:any class send color style print dex exp echo
1.restart.sh:
#!/bin/sh sh /home/zhoushuo/anydeskTest/stop.sh echo ‘zhoushuo‘|sudo -S /usr/bin/anydesk
2.stop.sh:
#!/bin/sh NAME=anydesk echo $NAME ID=`ps -ef | grep "$NAME" | grep -v "grep" | awk ‘{print $2}‘` echo $ID echo "---------------" for id in $ID do ./kill.sh $id echo "killed $id" done echo "---------------" echo "stop anydesk successfully!"
3.kill.sh:
#! /usr/bin/expect spawn sudo kill -9 [lindex $argv 0] send "zhoushuo\r" interact
标签:any class send color style print dex exp echo
原文地址:http://www.cnblogs.com/shuo1208/p/6758141.html