[linux] Shell Script 공부 3일차 - Chapter 3
Chapter 3 | Shell Structured Language Constructs ※ 리눅스 쉘 값 Zero Value(0) 는 Yes/True NON-ZERO Value 는 No/False $ cat foo $ echo $? foo 파일이 있는 경우 zero(0)가 반환된다. $ cat > showfile #!/bin/sh # #Script to print file # if cat $1 then echo -e "\n\nFile $1, found and successfully echoed" fi $ chmod 755 showfile $ ./showfile foo 다음 스크립트는 숫자가 양수인지 알아낸다. $ cat > ispositive #!/bin/sh # # Script to see whethe..
시스템 서버
2011. 10. 25. 17:41