[ ! -e a ]&&[ ! -e b ]&&[ ! -e c ]&&[ ! -e d ]&&echo "abcd都约会去了"
以为是判断文件了。。作者: baby_神 时间: 2016-01-16 15:34
if [ -e a -a -e b -a -e c -a -e d ]
then
echo "yes"
else
echo "no"
fi作者: 674949301 时间: 2016-01-16 16:41
哈哈哈!谢谢了大兄弟!回复 2# sync_1521
作者: Tianny_Xie 时间: 2016-01-18 10:25
#!/bin/bash
#Usage:check the file if it exists
DIR= #files path
cd $DIR
if [ -e a ] && [-e b ] && [ -e c ] && [ -e d ]
then
echo "The a b c d files exist"
else
echo "sorry,no files "
fi作者: jcdiy0601 时间: 2016-01-27 11:41
if [ -e file -a -e file ]
if [ -e file -o -e file]作者: ydzcjj 时间: 2016-01-27 11:50
检查当前目录
#!/bin/bash
if [ -e a -a -e b -a -e c -a -e d ]
then
echo "files exist"
else
echo "no files"
fi