freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

bash腳本編程基礎(chǔ)ppt課件(編輯修改稿)

2024-11-15 04:30 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 ATION] i=10。 j=20。 (( i++ )) (( t = i + j )) t=$(( i + j )) 管道與 here doc bc支持浮點(diǎn)數(shù)運(yùn)算 但 bc是交互式的, 怎么辦? bc EOF EOF稱為占位符 scale = 3 輸入的內(nèi)容 10 / 3 EOF echo scale = 3。 10 / 3 | bc 流程控制 ? 條件判斷 – if – case ? 循環(huán) – for, while – break, continue if ... then ? if ... 語句用于判斷一個(gè) /一組命令是執(zhí)行否成功 ? [[ ]] 表達(dá)式 ,測(cè)試字符串 ,文件 ? (( )) 表達(dá)式 ,測(cè)試數(shù)值計(jì)算結(jié)果 ? bash命令 ,測(cè)試命令是否執(zhí)行成功 ? 命令的退出碼 ( $? )為 0時(shí),代表 true 字符串測(cè)試 測(cè)試 意義 [[ n $str ]] $str 不為空值 [[ z $str ]] $str 為空值 [[ $str1 == $str2 ]] 相等 [[ $str1 != $str2 ]] 不等 文件測(cè)試 ? 更詳細(xì)內(nèi)容 man bash [CONDITIONAL EXPRESSIONS] 用法 意義 用法 意義 [[ b $file ]] 塊設(shè)備 [[ r $file ]] 文件可讀 [[ c $file ]] 字符設(shè)備 [[ s $file ]] 文件大小不為零 [[ d $file ]] 目錄 [[ w $file ]] 文件可寫 [[ e $file ]] 文件存在 [[ x $file ]] 文件可執(zhí)行 [[ f $file ]] 普通文件 [[ p $file ]] 命名管道 if ... else ... if expression。 then … elif expression。 then … else … fi 判斷 OS if [[ f /etc/SuSErelease ]]。 then echo SUSE OS elif [[ f /etc/slackwareversion ]]。 then echo Slackware OS else echo “Redhat ?” fi 命令的退出狀態(tài) ? 檢查 $? 的值是否為 0, 0為真 ,非 0為假 grep wq admin /etc/passwd if (( $? == 0 ))。 then echo “found” else echo “not found” fi if grep wq admin /etc/passwd then echo “found” else echo “not found” fi case 語法 case $var in condition1) Statments1 。 condition2) statments2 。 *) default statments 。 esac read answer case $answer in yes) echo yes 。 no) echo no 。 *) echo unknown 。 esac case中的字符匹配 ? * 匹配零個(gè)或多個(gè)任意字符 ? ? 匹配一個(gè)任意字符 ? [
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1