Header

  1. View current page

    정상혁의 수첩

Profile_img_60x60_08
195

Unix shell script

참고자료

UNIX의 Shell Script

Shell Script (1) - 기본기 다지기

Shell Script (2) - 환경변수와 지역변수

Shell Script (3) - Bourne Shell

Shell Script (4) - C Shel

 

실행

bash scriptName

sh scriptName

./scriptName

 

완료

echo $? 

exit 0 : 정상종료

exit 1 : 비정상 정료

 

계산

sum='expr 100+200'

echo $sum

 

파라미터

$0 명령어 그자체

$1,$2

$# 파라미터의 갯수

$@ 모든 파라미터

 

조건문

if  ["$1"="start"]; then

else

fi

 

반복문

for 1 in 1 2 3

do

echo $i

done

 

while [$n -lt 3];

do

 

done

History

Last edited on 02/18/2009 16:56 by benelog

Comments (0)

You must log in to leave a comment. Please sign in.