單項(xiàng)選擇題

在Shell變量引用操作符可實(shí)現(xiàn)字符串替換其中()用來(lái)測(cè)試如果變量stra存在且不為空,則返回為word,否則返回為空串。

A.${stra:-word }
B.${stra:=word }
C.${stra: +word }
D.${stra: ?word }

微信掃碼免費(fèi)搜題