#ifelse_exam.sh脚本用于检查输入的字符串是否是一个当前目录
#!/bin/bash
if [ "$1" ]
then
echo "What you input is not null"
if [ -e "$1" ]
then
echo "The file $1 is existence!"
else
echo "The file $1 is not existence!"
fi
else
echo "What you input is null!"
fi
原创 | 2022-12-05 11:38:43 |浏览:1.6万
#ifelse_exam.sh脚本用于检查输入的字符串是否是一个当前目录
#!/bin/bash
if [ "$1" ]
then
echo "What you input is not null"
if [ -e "$1" ]
then
echo "The file $1 is existence!"
else
echo "The file $1 is not existence!"
fi
else
echo "What you input is null!"
fi
Copyright 2005-2020 www.kxting.com 版权所有 | 湘ICP备2023022655号
声明: 本站所有内容均只可用于学习参考,信息与图片素材来源于互联网,如内容侵权与违规,请与本站联系,将在三个工作日内处理,联系邮箱:47085,1089@qq.com