리눅스 export

1 개요[ | ]

리눅스 export

2 실습 1[ | ]

root@zetawiki:~# VAL=10
root@zetawiki:~# sh -c 'echo VAL=$VAL'
VAL=
root@zetawiki:~# export VAL=20
root@zetawiki:~# sh -c 'echo VAL=$VAL'
VAL=20

3 실습 2[ | ]

root@zetawiki:~# cat print_a.sh 
echo A=[$A]
root@zetawiki:~# cat hello.sh 
A=hello
sh print_a.sh
root@zetawiki:~# sh hello.sh 
A=[]
root@zetawiki:~# cat world.sh 
export A=world
sh print_a.sh
root@zetawiki:~# sh world.sh 
A=[world]

4 같이 보기[ | ]

5 참고[ | ]

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