Shell script Programming

Shell

CentOS bash Shell
명령어를 해석해서 Kernel에 전달!

사용법
명령어 [옵션] [인자]

vi로 작성 가능
확장명 => *.sh

항상 맨 위에 써줌!!
#! /bin/sh
shell프로그램 이용해서 실행하겠다!

실행방법
sh [*.sh]

또는

chmod ugo+x [*.sh]
./*.sh



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
testval=Hello
echo $testval
 
testval='Yes Sir'
echo $testval
 
#################################
#!/bin/sh
if ["woo" != "woo"]
then
    echo "참"
else
    echo "거짓"
fi
 
 
if [100 -eq 200]
then 
    echo "같다"
else
    echo "다르다"
fi
 
#################################
for i in 1 2 3 4 5 6
do
    hap='expr $hap + $i'
done
echo $hap
 
for((i=1;i<=10;i++))
do
 
done
 
#################################
while [1]
do
 
done
cs
Share:

0 개의 댓글:

댓글 쓰기