일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- VSCode
- macos
- deployment
- golang
- HLS
- nginx-media-server
- ffmpeg
- docker
- kubectl
- dart
- Shell script
- configmap
- Windows10
- Java
- 행정구역분류
- Sysinternals
- wireshark
- spring cloud config
- aws
- android studio
- Kubernetes
- Flutter
- namespace
- ebpf
- Android
- aws cli
- service
- Pod
- Python
- RTMP
Archives
- Today
- Total
woonizzooni
쉘 스크립트 파일 작성하기 - #!으로 시작 + 공백없이 + 바이너리명 본문
쉬뱅/샤뱅/(She(#)bang(!) : #!) 라인으로 시작해서,
내용 작성/저장 > 실행권한 주고 실행.
아래는 sh 스크립트 예.
$ vim hello.sh #!/bin/shecho "hello world"
$ chmod 755 ./hello.sh $ ./hello.sh "hello world" |
응용)
#!/bin/sh
#!/usr/bin/python3
#!/usr/bin/perl
...
[참고]
wiki.kldp.org/HOWTO/html/Adv-Bash-Scr-HOWTO/sha-bang.html
'Programming > Shell-script' 카테고리의 다른 글
쉘 스크립트 - 배열 다뤄보기 / 배열 선언 / 배열끼리 병합 등... (0) | 2021.06.18 |
---|---|
자동 입력 쉘 스크립트 작성 (Here Document / Input Redirection 활용) (0) | 2020.11.23 |
Comments