Update test.sh
This commit is contained in:
23
test.sh
23
test.sh
@@ -18,19 +18,12 @@ fi
|
||||
|
||||
|
||||
|
||||
function myfunc()
|
||||
{
|
||||
local -n __resultvar="$1" || return 1
|
||||
__resultvar[0]="a"
|
||||
__resultvar[1]="b"
|
||||
echo 'yes';
|
||||
if [ -f /etc/debian_version ] ; then
|
||||
__resultvar[2]="c"
|
||||
__resultvar[3]="d"
|
||||
__resultvar[4]="e"
|
||||
fi
|
||||
echo "ok"
|
||||
}
|
||||
|
||||
if [ "${(detect_os OS)[1]}" = "debian" ]; then echo 'YES'; fi
|
||||
while getopts 'r' flag; do
|
||||
case "${flag}" in
|
||||
r) echo "R" ;;
|
||||
a) echo "A" ;;
|
||||
b) echo "B" ;;
|
||||
c) echo "C" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user