用脚本编写判断/bin目录下date文件 编写一个名为iffile程序,它执行时判断/bin目录下date文件是否存在? #!/bin/bash if [ -f /bin/date ] then echo "/bin/date file exist." else echo "/bin/date not exist." fi 测试结果