首页 > 系统服务 > 详细

linux shell program summary

时间:2016-09-23 21:16:57      阅读:194      评论:0      收藏:0      [点我收藏+]

from:Sep 23 2016


 

mathematical operation:

技术分享

floating number,bc calculator:

技术分享

we can also use bc in shell scripts:

技术分享


 

if - then - else

number comparison:

              n1 -eq n2

              n1 -ge n2

              n1 -gt n2

              n1 -le n2

              n1 -lt n2

              n1 -ne n2

技术分享

if - then - elif, notice that the second elif won‘t be executed, though it‘s also right.

技术分享


 

strings comarison:

                          str1 = str2

                          str1 != str2

                          str1 < str2

                          str1 /> str2

                          -n str1

                          -z str1

技术分享


 

linux shell program summary

原文:http://www.cnblogs.com/rixiang/p/5901493.html

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