黃河泉 发表于 2020-12-27 09:08 
请 help capture。
感谢您的回复!很有帮助!
capture executes command, suppressing all its output (including error messages, if any) and issues
a return code of zero. The actual return code generated by command is stored in the built-in
scalar _rc.
capture can be combined with {} to produce capture blocks, which suppress output for the block of
commands. See the technical note in [P] capture for more information.