eval 뒤의 string arg 들을 command 로 실행하게 해줌 string 수준에서 최종 Command 조작 후 실행시 유용하다
Directory Exists? $ cat directory_ex.sh #!/bin/bash test_dir_exist(){ set -e if [ -e "/home/jayleekr/workspace/00_codes/05_info_archive" ];then echo "DIR Exist" exit 1 ...
And $ cat and_or.sh #!/bin/bash test_and_or(){ TEST="11" TEST2="22" if [ "$TEST" == "11" ] && [ "$TEST2" == "22" ] ;then echo "String Exist by And" fi if [ "$...
for $ cat for.sh #!/bin/bash LISTS=("a" "b" "c") # Don't forget Brace! echo ${LISTS[0]} echo ${LISTS[1]} echo ${LISTS[2]} # Don't forget Brace! for item in ${LISTS[@]} do echo $item done $...
Bash list?
Bash Get Ip address?
Comments powered by Disqus.