2016年12月9日

shell 脚本中使用case查看登陆用户

摘要: #! /bin/bash case $USERNAME in "student")echo u r using student;; "leonard")echo u r using leonard;; *)echo u r using other account;; esac 阅读全文

posted @ 2016-12-09 23:39 leonardhelloworld 阅读(223) 评论(0) 推荐(0) 编辑

Shell脚本中使用test测试命令测试数值

摘要: 101是否小于或等于99 类似的特殊符号还有 -eq 【判断是否相等】 -ge 【判断是否大于或等于】 -lt 【判断是否小于】 -ne 【判断是否不等于】 可以使用命令“[]”代替test命令来作为逻辑表达式 阅读全文

posted @ 2016-12-09 23:08 leonardhelloworld 阅读(466) 评论(0) 推荐(0) 编辑

导航