当前位置: 首页 > news >正文

上海松江做网站的公司关键词优化排名软件s

上海松江做网站的公司,关键词优化排名软件s,网站转微信小程序,站酷网手机版命令是双向选择语句,当用户执行脚本时如果不满足if后的表达式也会执行else后的命令,所以有很好的交互性。其结构为: if expression1 then command … command else command … command fi vim ifelse_exam.sh #ifelse_exam.sh #!/bin/bashec…

命令是双向选择语句,当用户执行脚本时如果不满足if后的表达式也会执行else后的命令,所以有很好的交互性。其结构为:
if expression1
then
command

command
else
command

command
fi

++++++++++++++++++++++++++++++++++++++++++++++

vim ifelse_exam.sh 
#ifelse_exam.sh
#!/bin/bashecho "Please input the file which you want to delete:"
read fileread -p "Please input the file which you want to delete:" fileif rm -f "$file"
thenecho "Delete the file $file  sucessfully!"
elseecho "Delete the file $file failed!"
fi

++++++++++++++++++++++++++++++++++++++++++++++

vim ifelse_exam1.sh 
# ifelse_exam1: input a file name and test the file exist or not.
#!/bin/bash
if [ ! -e "$1" ]
thenecho "file $1 do not exist."exit 1
elseecho "file $1 exits."
fi

++++++++++++++++++++++++++++++++++++++++++++++

vim  ifelse_exam2.sh 
#ifelse_exam2.sh
#!/bin/bash
if [ "$1" ]
then   echo "What you input is not null!"if [ -e "$1" ]thenecho "The file $1 is existence !"elseecho " The file $1 is not existence !"fi
elseecho "what you input is null!"
fi

++++++++++++++++++++++++++++++++++++++++++++++

vim ifelse_exam3.sh 
#!/bin/bash
# script to determine a letter grade from a test score#提示用户输入分数(0~100)
echo "Please Input a integer(0-100): "
read score#判断学生的分数类别
if [ "$score" -lt 0 -o "$score" -gt 100 ]
thenecho "The score what you input is not integer or the score is not in (0-100)."
elseif [ "$score" -ge 90 ]thenecho "The grade is A!"elseif [ "$score" -ge 80 ]thenecho "The grade is B!"elseif [ "$score" -ge 70 ]thenecho "The grade is C!"elseif [ "$score" -ge 60 ]thenecho "The grade is D!"elseecho "The grade is E!"fifififi
fi

++++++++++++++++++++++++++++++++

# vim love.sh
#!/bin/bash
read -p "请输入你是否爱我,我爱你|我不爱你:" loveif [  我爱你 == "$love" ]
thenecho "我也爱你!"
elseecho "我也不爱你!"
fi
# chmod +x love.sh
# ./love.sh
http://www.khdw.cn/news/30108.html

相关文章:

  • 网站建设如何创建框架页面广东疫情动态人民日报
  • 微信网站开发多少钱青岛seo排名扣费
  • 许昌市住房和城乡建设厅网站国内新闻摘抄2022年
  • 适合初学者做的网站外包服务公司
  • 黑马程序员官方网站网络营销策划书总结
  • fedora做网站服务器免费网站推广优化
  • strikingly建站工具百度关键词规划师入口
  • 怎么做网站卖产品口碑营销的重要性
  • 用wgert 做网站检测760关键词排名查询
  • 自己做网站用什么软件下载seo外链论坛
  • 钓鱼网站制作步骤产品设计
  • 个人怎么做淘宝客网站李守洪排名大师怎么样
  • 网站模板 安全吗泉州百度推广咨询
  • wpf做网站教程seo服务收费
  • 丰台做网站西安 做网站
  • 电子商务网站建设及推广方案商品推广
  • 做网站优化的价格宁波网站推广专业服务
  • 企业网站日常维护核心关键词举例
  • 本周时事新闻概要10条企业整站seo
  • 百度小程序制作流程网站seo优化外包
  • 建设网站要买服务器优化大师软件下载
  • 找做网站的公司安装百度到手机桌面
  • 网站建设 比选免费产品推广网站
  • 中国做网站公司排名国外搜索引擎入口
  • 做网站页面网络营销的优势
  • 免费企业网站程序asp建什么网站可以长期盈利
  • 靠谱的app开发公司百度优化软件
  • 满城做网站电话杭州免费网站制作
  • 黄埔建网站公司线上培训机构排名前十
  • 外贸网站seo教程郑州seo外包平台