#!/bin/bash
touch file1
rm -f file2
if [ -f file1 ] && echo "hello" && [ -f file2 ] && echo "there"
then echo "in if"
else
echo "in else"
fi
exit 0
shell learning [and 的用法]
最新推荐文章于 2021-05-13 11:48:24 发布
#!/bin/bash
touch file1
rm -f file2
if [ -f file1 ] && echo "hello" && [ -f file2 ] && echo "there"
then echo "in if"
else
echo "in else"
fi
exit 0