POSIX Shell: 스크립트 실행 방법

00_Test.sh

#!/bin/sh
lanuage="Korean"
echo "Hello, $lanuage!"

$ sh 00_Test.sh
Hello, Korean!

sh 명령어 이용

$ sh 00_Test.sh
Hello, Korean!

chmod 명령어 이용

$ chmod +x 00_Test.sh
$ ls -al
-rwxr-xr-x. 1 lycos7560 lycos7560  50 May 21 05:10 00_Test.sh
$ ./00_Test.sh
Hello, Korean!

댓글 달기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

위로 스크롤