1
1
mirror of https://github.com/chubin/cheat.sh.git synced 2024-12-02 16:04:13 +03:00

chmod.sh code readability

This commit is contained in:
Your Name 2020-06-11 05:21:32 -04:00
parent c01df36524
commit 5bdf06963b

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=' '