MyAlbum   Pet
DirectX   openGL   Java   C/C++   STL   C#   Python   Window   ActiveX   SE & Refactoring   Game   Unicode   googleDesktop   Network   Database   Web   php   asp   asp.net   Library   QT   wxWidget   Something to read  
ToDo
zelon's WebAlbum
Google Tools
Google Naver map
ToRearrange
OpenOffice.org
Eclipse
Check W3 validator
Linux Shell Programming
e i R f
Anonymous

쉘 스크립팅 #


if 문 #

if (조건)
''commands''
then
''commands''
fi

case 문 #

case (값) in
(조건)) commands;;
(조건)) commands;;
esac

while 문 #

while
''command''
do
''commands'';;
done


조건 #

-d fileThe specified file exists and is a directory.
-e fileThe specified file exists.
-r fileThe specified file exists and is readable.
-s fileThe specified file exists and has non-zero size.
-w fileThe specified file exists and is writable.
-x fileThe specified file exists and is executable.
-L fileThe specified file exists and is a symbolic link.
f1 -nt f2File f1 is newer than file f2.
f1 -ot f2File f1 is older than file f2.
-n s1String s1 has nonzero length.
-z s1String s1 has zero length.
s1 = s2String s1 is the same as string s2.
s1 != s2String s1 is not the same as string s2.
n1 -eq n2Integer n1 is equal to integer n2.
n1 -ge n2Integer n1 is greater than or equal to integer n2.
n1 -gt n2Integer n1 is greater than integer n2.
n1 -le n2Integer n1 is less than integer n2.
n1 -lt n2Integer n1 is less than or equal to integer n2.
n1 -ne n2Integer n1 is not equal to integer n2.
!The not operator, which reverses the value of the following condition.
-aThe and operator, which joins two conditions. Both conditions must be true for the overall result to be true.
-oThe or operator, which joins two conditions. If either condition is true, the overall result is true.
\( ... \)You can group expressions within the test command by enclosing them within \( and \).