BASH Shell script - control block with if then else

if then else

if [ "mp3" == "$section" ]; then echo mp3 section; else echo unknown section; fi

or on separate lines

if [ "mp3" == "$section2" ]
  then
    echo mp3 section
  else
    echo unknown section
fi

Published: Friday, 28 November 2014