例子,shell/ target=_blank class=infotextkey>shell脚本 检查文件是否存在。
#!/bin/bash #
FILE="/etc/hosts" if [ -f $FILE ]; then echo "File ${FILE} exists" else echo "File ${FILE} does NOT exists" fi
CopyRight © 2010-2021 脚本学堂 Jb200.com , All Rights Reserved.