#!/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 的用法]
最新推荐文章于 2024-01-30 17:49:45 发布
#!/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