{홈 디렉토리}/.vimrc 에 다음과 같은 내용 저장
syntax onset tabstop=4set shiftwidth=4set smartindentset cindent
$ cd ~
$ vi helloworld.sh
#!/bin/bash
echo "Hello World"
:wq ( 저장 후 종료 )
$ chmod +x ./helloworld.sh
$ ./helloworld.sh
다음과 같은 결과를 볼수 있습니다.
helloworld.sh 파일 상단에 적은 #!/bin/bash 문구가 해당 파일은 shell script 파일이다!! 라는 것을 알려주는 겁니다. ㅎㅎ
'쉘 스크립트' 카테고리의 다른 글
[부록] Crontab 의 간단한 사용법 (0) | 2017.01.31 |
---|