"리눅스 set -ax"의 두 판 사이의 차이

(새 문서: ==개요== ;리눅스 set -ax * set -a + set -x {{소스헤더|parent.sh}} <source lang='bash'> #!/bin/bash set -ax source child1.sh ./child2.sh </source> {{소스헤더|chil...)
 
1번째 줄: 1번째 줄:
==개요==
==개요==
;리눅스 set -ax
;리눅스 set -ax
* [[set -a]] + [[set -x]]
* [[리눅스 set -a]] + [[리눅스 set -x]]


{{소스헤더|parent.sh}}
{{소스헤더|parent.sh}}

2018년 11월 15일 (목) 21:51 판

1 개요

리눅스 set -ax
parent.sh
#!/bin/bash
set -ax
source child1.sh
./child2.sh
child1.sh
#!/bin/bash
foo=hello
bar=world
echo -- child1 end...
child2.sh
#!/bin/bash
echo -- child2 start...
echo foo=[$foo]
echo bar=[$bar]
실행결과
$ ./parent.sh 
-- child1 end...
-- child2 start...
foo=[hello]
bar=[world]

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}