편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
1번째 줄: | 1번째 줄: | ||
==개요== | ==개요== | ||
{{소스헤더|parent.sh}} | {{소스헤더|parent.sh}} | ||
< | <source lang='bash'> | ||
#!/bin/bash | #!/bin/bash | ||
source child.sh | source child.sh | ||
7번째 줄: | 7번째 줄: | ||
echo bar=[$bar] | echo bar=[$bar] | ||
echo -- parent end... | echo -- parent end... | ||
</ | </source> | ||
{{소스헤더|child.sh}} | {{소스헤더|child.sh}} | ||
< | <source lang='bash'> | ||
#!/bin/bash | #!/bin/bash | ||
foo=hello | foo=hello | ||
bar=world | bar=world | ||
echo -- child end... | echo -- child end... | ||
</ | </source> | ||
{{소스헤더|실행결과}} | {{소스헤더|실행결과}} | ||
< | <source lang='console'> | ||
$ ./parent.sh | $ ./parent.sh | ||
-- child end... | -- child end... | ||
22번째 줄: | 22번째 줄: | ||
bar=[world] | bar=[world] | ||
-- parent end... | -- parent end... | ||
</ | </source> | ||
==같이 보기== | ==같이 보기== | ||
* [[리눅스 source]] | * [[리눅스 source]] | ||
* [[Bash 자식스크립트에 변수 전달하기]] | * [[Bash 자식스크립트에 변수 전달하기]] | ||
[[분류: Bash]] | [[분류: Bash]] |