JavaShuo
欄目
標籤
Linux有關Shell中if用法筆記
時間 2021-07-12
欄目
Linux
简体版
原文
原文鏈接
shell中的if主要是用於程序的判斷邏輯,從而控制腳本的執行邏輯。這和很多編程語言思路上都是一致的。 1、if的用法結構如下: if exp;then command1; command2; fi 示例: #根據輸入的學生成績打印對應的成績等級:大於90分爲優秀;大於80分良好,60到80分爲及格;小於60分爲差。 cat test.sh #!/bin/bash read -p "請輸入分數:"
>>阅读原文<<
相關文章
1.
linux shell if 語法
2.
Linux有關Shell變量的筆記
3.
Linux中Shell的轉義用法筆記
4.
Linux有關Shell算數運算的用法補充筆記
5.
linux下shell中if的相關參數
6.
linux,shell中if else if的寫法,if elif
7.
Linux中shell概念筆記
8.
linux shell 之if-------用if作判斷
9.
Linux中shell變量作用域筆記
10.
linux shell 筆記
更多相關文章...
•
Spring中Bean的作用域
-
Spring教程
•
在Spring中使用Redis
-
Redis教程
•
Tomcat學習筆記(史上最全tomcat學習筆記)
•
C# 中 foreach 遍歷的用法
相關標籤/搜索
Linux-shell
linux&shell
shell+linux
linux+shell
Linux筆記
算法筆記
有關
關中
學習筆記——Linux
學渣Linux筆記
Linux
Unix
MySQL教程
MyBatis教程
Docker教程
應用
算法
註冊中心
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
gitlab4.0備份還原
2.
openstack
3.
深入探討OSPF環路問題
4.
代碼倉庫-分支策略
5.
Admin-Framework(八)系統授權介紹
6.
Sketch教程|如何訪問組件視圖?
7.
問問自己,你真的會用防抖和節流麼????
8.
[圖]微軟Office Access應用終於啓用全新圖標 Publisher已在路上
9.
微軟準備淘汰 SHA-1
10.
微軟準備淘汰 SHA-1
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
linux shell if 語法
2.
Linux有關Shell變量的筆記
3.
Linux中Shell的轉義用法筆記
4.
Linux有關Shell算數運算的用法補充筆記
5.
linux下shell中if的相關參數
6.
linux,shell中if else if的寫法,if elif
7.
Linux中shell概念筆記
8.
linux shell 之if-------用if作判斷
9.
Linux中shell變量作用域筆記
10.
linux shell 筆記
>>更多相關文章<<