bash or shell (.sh linux)
Go to solution
Solved by Mr_KoKa,
Yup, you're right. It would look like this
if [ "$#" -ge 1 ]; then if [ "$1" == "cmd1" ]; then echo "This is cmd 1." elif [ "$1" == "cmd2" ]; then echo "This is cmd 2." else echo "$1 is not valid command parameter." fi else echo "No command parameter provided." fi

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now