I'm trying to write a short intro to a bash script that checks what Debian version that's running, and if it's NOT wheezy or jessie, will end the entire script.
This is what I have:
release=$(lsb_release -cs)
if [["$release" != "jessie" && "$release" != "wheezy"]]; then echo "this is the wrong version" exit fi
echo "this should only be shown if the OS is either jessie or wheezy"
I've tried to rewrite the if statement several times, but running thios script on for example ubuntu cosmic still outputs "this should only be shown if the OS is either jessie or wheezy"
Aucun commentaire:
Enregistrer un commentaire