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:
parent
c01df36524
commit
5bdf06963b
@ -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=' '
|
||||
|
Loading…
Reference in New Issue
Block a user