Answer the question
In order to leave comments, you need to log in
What does this case mean?
Please explain what does "-u=*|--user=*)" mean, what are "shift" and ";;" for?
case $i in
-u=*|--user=*)
USER="${i#*=}"
shift
;;
esac
Answer the question
In order to leave comments, you need to log in
1) This means that the case should work if the variable i has a value starting with the string "-u=" or with the string "--user="
2) shift shifts the positional parameters, deleting the very first one. For example, the script is called like this:
The positional parameters are as follows:
$1=1
$2=2
$3=3
$1=2
$2=3
$3 пустой
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question