#!/bin/ksh ssh -l db2inst1 192.168.1.8 [[ -d /tmp ]] if [ $? -eq 0 ]; then echo "192.168.1.8 has /tmp directory" else echo "192.168.8.8 doesn't have /tmp directory" fi ssh -l db2inst1 192.168.1.8 [[ -d /tmpnotexist ]] if [ $? -eq 0 ]; then echo "192.168.1.8 has /tmpnotexist directory" else echo "192.168.8.8 doesn't have /tmpnotexist directory" fi |
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |