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

chmod.sh code readability

This commit is contained in:
Your Name
2020-06-11 05:21:32 -04:00
parent c01df36524
commit 5bdf06963b
+1 -1
View File
@@ -24,7 +24,7 @@ chmod_calc(){
do
num=$(echo "obase=2;${p_n:$i:1}" | bc | xargs printf '%03d')
# If 4 digit input -> process specials
if [[ ${#p_n} -eq 4 && $i -eq 0 ]]
if [ $i -eq 0 ]
then
[ ${num:0:1} -eq 1 ] && setuid='X' || setuid=' '
[ ${num:1:1} -eq 1 ] && setgid='X' || setgid=' '