OS & Shell/bash
[bash] source, include other bash file
냐옴
2021. 4. 1. 10:30
다른 bash 파일 인클루드 방법
source some_bash_file.sh
example
## 인클루드 할 파일
$ vi common.sh
HOME_PATH=/home
## 인클루드 하는 파일
$ vi run.sh
source ./common.sh
echo $HOME_PATH
## 실행
$ ./run.sh
/home