-
if $? -ne 0 syntax error then unexpected
V BASHi poměrně normálně fungující if [ $? -ne 0 ]; then ... fi v různé variantě shellu hází chyby (syntax error then unexpected), chvilku trvalo, než jsem došel na toto: if [[ $? -ne 0 ]]; then ... fi
Ze světa lomítkáře, IT support, externista a další
V BASHi poměrně normálně fungující if [ $? -ne 0 ]; then ... fi v různé variantě shellu hází chyby (syntax error then unexpected), chvilku trvalo, než jsem došel na toto: if [[ $? -ne 0 ]]; then ... fi