Is there a linux bash command like the java try catch finally? Or does the linux shell always go on?
try { `executeCommandWhichCanFail` mv output } catch {
Well, sort of:
{ # your 'try' block executeCommandWhichCanFail && mv output } || { # your 'catch' block mv log } rm tmp # finally: this will always happen