首页 > 系统服务 > 详细

linux arguments variables usage

时间:2018-01-12 11:15:22      阅读:182      评论:0      收藏:0      [点我收藏+]
#! /bin/bash
if [ $# -ne 1 ];then
echo "please input one argument:"
exit 1
fi

if [ $1 -eq 1 ];then
echo "you input is $1."
elif [ $1 -eq 2 ];then
echo "you input is $1."
else
echo "you input is wrong."
exit 2
fi

linux arguments variables usage

原文:http://blog.51cto.com/546136/2060111

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!