if文ワンライナー 投稿日 2019/09/04 投稿者 rengotaku 1 分で読めます if文ワンライナー コンテンツ if文ワンライナー [ ${PIPESTATUS[0]} == 0 ] のように記載する$ sh -c 'true | tee && [ ${PIPESTATUS[0]} == 0 ]'; echo $?bashの結果の比較 [[ $? == 0 ]] 元 if [ -f ${target} ]; then echo 'true' ;fi 簡素なif文は一行で書く - 半径5メートル devtools shell linux シェア