samedi 24 mars 2018

when to use new line terminator ; in active bash shell

if i write this in a script it runs

if [[ 1 == 1 ]]
 then
   echo "true"
 fi

but if I tried to replace newline with ; when using an active shell i get syntax error

if [[ 1 == 1 ]]; then; echo "true"; fi

why?

Aucun commentaire:

Enregistrer un commentaire