單項選擇題在Shell變量引用操作符可實現(xiàn)模式匹配替換其中()用來的含義是若pattern匹配變量stra的頭部,則刪除最長匹配部分并返回剩余部分。
A.${stra #pattern}
B.${stra##pattern }
C.${stra%pattern}
D.${stra%%pattern}
您可能感興趣的試卷
你可能感興趣的試題
1.單項選擇題在Shell變量引用操作符可實現(xiàn)字符串替換其中()用來測試,如果變量stra存在,則返回為變量stra的值,否則輸出為word,并退出當(dāng)前腳本程序。
A.${stra-word }
B. ${stra=word }
C.${stra: +word }
D.${stra: ?word }
2.單項選擇題在Shell變量引用操作符可實現(xiàn)字符串替換其中()用來測試如果變量stra存在且不為空,則返回為word,否則返回為空串。
A.${stra:-word }
B.${stra:=word }
C.${stra: +word }
D.${stra: ?word }