Sample Header Ad - 728x90

How to restore the value of shell options like `set -x`?

78 votes
8 answers
16931 views
I want to set -x at the beginning of my script and "undo" it (go back to the state before I set it) afterward instead of blindly setting +x. Is this possible? P.S.: I've already checked here ; that didn't seem to answer my question as far as I could tell.
Asked by Roney Michael (883 rep)
Sep 20, 2016, 01:05 AM
Last activity: Jul 22, 2025, 02:48 PM