System/OS
2003.04.23 10:36
[linux] 셀 스크립트 if, for, case in..
Views 13905 Comment 0
스크립트 인수1 인수2 인수3
#!/bin/sh
echo $1; echo $2; echo $3
if then, elif, else 제어문
echo -n 'enter a number : '
read number
if [ $number -lt 0 ]
then
echo smaller than zero
elif [ $number -eq 0 ]
then
echo zero
else
echo bigger than zero
fi
case in 제어문
for color in blue red green
do
echo one color is $color
done
case in 제어문
case 변수 in
"first")
first 경우의 실행 코드
;;
"second")
second 경우의 실행 코드
;;
"third")
third 경우의 실행 코드
;;
*)
Default 경우
;;
esac
-
[linux] Proftpd 설치 가이드
-
[linux] 기존 환경설정 저장하면서 커널 컴파일..
-
[linux] 스케쥴링 순서(nice) 변경하기
-
[linux] 셀 스크립트 if, for, case in..
-
[linux] 종료와 종료코드 확인(환경변수에서)
-
[linux] 프로세스 상태확인(ps)
-
[linux] 메타(기호)문자의 의미와 사용
-
[linux] 특수문자 환경 설정(stty)
-
[linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd
-
[linux] apache, php, jsp 환경설정하기..
-
[linux] 랜카드 2개 설정 & iptables 로 사설 ip..
-
[linux] 간단한 NAT 설정 script