1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

added comments, fixed blank table on hiphen error

This commit is contained in:
Your Name
2020-07-03 08:55:26 -04:00
parent 2217cc0ca6
commit 20daf66cf3
+4
View File
@@ -56,6 +56,7 @@ chmod_calc(){
# If permission string is given -> calc number
elif [[ $1 =~ ^[r,s,S,t,T,w,x,-]+$ ]]
then
# FULL STRING
if [[ ${#1} -eq 9 ]]
then
p_s=$1
@@ -89,6 +90,7 @@ chmod_calc(){
fi
p_n+="$num"
done
# PARTIAL STRING
elif [[ $1 =~ ^[r,s,t,w,x]+$ ]]
then
p_s='---------'
@@ -136,6 +138,8 @@ chmod_calc(){
sticky='X'
fi
p_n="${p_n0}${p_n1}${p_n2}${p_n3}"
else
return 1
fi
else
return 1