Shell Script

vim tes.sh

lalu

#!/bin/bash

nama="syahrul"
echo $nama
# Will print out : syahrul

NAME="Gunawan"
readonly NAME
NAME="Aulia"
# Will print out : /bin/bash: NAME: This variable is read only.

NAME="Carloz"
unset NAME
echo $NAME
# Will print out : (nothing)

chmod

chmod +x tes.sh

tambahan

common chmod

rwxrwxrwx = 111111111 = 777
rwxrwx--- = 111111000 = 770
rwxr-xr-x = 111101101 = 755
rwxr--r-- = 111100100 = 744
rwx------ = 111000000 = 700
rw-rw-rw- = 110110110 = 666
rw-r--r-- = 110100100 = 644
rw------- = 110000000 = 600
r-------- = 100000000 = 400

menghapus kecuali

find . -type f,d ! -name 'pyt.py' -delete