avatar
k*r
1
Could anyone explain to me why and how we use "trap"? I would appreciate if
you could explain it with a simple example. Thanks a lot.
avatar
T*r
2
http://www.uwsg.iu.edu/UAU/shell/script/trap.html

【在 k******r 的大作中提到】
: Could anyone explain to me why and how we use "trap"? I would appreciate if
: you could explain it with a simple example. Thanks a lot.

avatar
k*r
3
Thanks for your reply.
Here is an example from the tutorial referenced by you.
trap 'rm -f $TMPFILE; exit 0' 1 2 15
My question is that are signals system defined? How'd I know their meanings?
Guess I should get a good Unix book. Any recommendation?

if

【在 T********r 的大作中提到】
: http://www.uwsg.iu.edu/UAU/shell/script/trap.html
avatar
T*r
4
man 7 signal

【在 k******r 的大作中提到】
: Thanks for your reply.
: Here is an example from the tutorial referenced by you.
: trap 'rm -f $TMPFILE; exit 0' 1 2 15
: My question is that are signals system defined? How'd I know their meanings?
: Guess I should get a good Unix book. Any recommendation?
:
: if

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。