linux shell中if 语句想要then后什么也不执行,关键词是什么?
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/05/25 04:27:18
linux shell中if 语句想要then后什么也不执行,关键词是什么?
if [ -e ./test19 ]
then
\x05if [ -f ./test19 ]
then
/这里应填什么?/
\x05else
\x05\x05touch ./test19
\x05fi
else
\x05touch ./test19
fi
if [ -e ./test19 ]
then
\x05if [ -f ./test19 ]
then
/这里应填什么?/
\x05else
\x05\x05touch ./test19
\x05fi
else
\x05touch ./test19
fi
你为什么要做两个判断?我看你的意思就是如果test19这个file不存在然后创建.
为什么之前还要做一个-e的判断?如果你只是判断test19,写这一句不就足够了.
if [ ! -f test19 ]
then
touch test19
fi
为什么之前还要做一个-e的判断?如果你只是判断test19,写这一句不就足够了.
if [ ! -f test19 ]
then
touch test19
fi
linux shell的if语句
linux shell if语句求解释
shell 中 if then语句中会跟着-ne -ge之类的语句是什么意思呢
关于linux shell 循环语句的问题
在Linux shell脚本中,比如有个a.sh ,那么执行./a.sh .a.sh 和 sh a.sh 有什么具体的区
shell相关 请问if [ "${0:0:1}" != "/" ] ; then中${0:0:1}的具体解释
if(1) c语言中条件什么意思,是不是一定会执行下面语句
linux中的shell是什么意思?
12、语句if 3*4>=10 then a=1 else a=2 执行后,a的值为( ). A、12 B、10 C、1
pascal if...then 语句
C语言中IF语句,表达式成立判为1,不成立判为0.成立则执行if后的语句,不成立则执行else后的语句.
求C语句中if与then之间的用法