1. #!/bin/bash
    2. case $1 in
    3. "start"){
    4. for i in xx xx xx
    5. do
    6. echo "********** $1 start ***********"
    7. ssh $i "xxx xxx xxx"
    8. done
    9. };;
    10. "stop"){
    11. for i in xx xx xx
    12. do
    13. echo "********** $1 stop ***********"
    14. ssh $i "xxx xxx xxx"
    15. done
    16. };;
    17. esac