jeudi 24 décembre 2015

tsch run command if command was run

I'm not really familiar with TSCH

I would like run a command2 if a command1 in shell was entered. such as something like this

if command1  then
    echo "Command succeeded"
    command2
else
    echo "Command failed"
fi

I tryied this one but it dosen't like something Step two would be read and print in a file a part some variable that command1 changed (making a kind of history only for some variables) thanks for any help!

Aucun commentaire:

Enregistrer un commentaire