shell 调试技巧

恭喜你发现宝藏!!!

https://chegva.com/3776.html

 

摘抄

trap '' 2  # 信号2就是Control-C, 现在被禁用了. 
command    # 比如说对文件作写操作时,避免被打断
command
command
trap 2     # 重新恢复Control-C

 

posted @ 2020-09-05 22:31  有你~你是美好滴  阅读(135)  评论(0)    收藏  举报