System/OS
2003.04.23 10:36
[linux] 셀 스크립트 if, for, case in..
조회 수 13698 댓글 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] ssh에서 원격 파일 전송하기..
-
[linux] The Ultimate Wget Download Guide With 15 Awesome Examples
-
[linux] vi 편집기 간단한 명령과 환경설정
-
[linux] wget 명령 사용 예제
-
[linux] Xwindow/Xmanager 사용
-
[linux] X환경 GNOME에서 KDE로 바꾸는 법..
-
[linux] yum 업데이트 시 커널 제외하기
-
[linux] 간단한 find 명령어 설명(업데이트 해야 함)
-
[linux] 간단한 NAT 설정 script
-
[linux] 간단한 vi편집기 사용 명령
-
[linux] 계정관리하기(내공쌓기)
-
[linux] 기본 명령어 (내공쌓기)