UsiScript
#!/bin/bash ## Original author = silfun1 ## description ## Template with one variable named VAR1, that get value form an argument given to the script ## There is a check to see if there is the argument and if the variable is not empty # created by xxx # modify on 01/01/2015 #-----VARIABLES----- VAR1="" #-----MAIN----- if [ $# -gt 0 ] then VAR1=$1 else echo "Usage : $0
" exit 1; fi if [ "$VAR1" == "" ] then echo "Enter a value :" read VAR1 fi command1 if [ $? -eq 0 ] then echo "Good" else echo "Error" fi