Created
September 15, 2017 09:33
-
-
Save T1T4N/3d8de80ec9035e3280b146875bab77b0 to your computer and use it in GitHub Desktop.
Save shell options (set command) and restore them
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local -r SAVED_OPTIONS=$(set +o) | |
source "script_that_modifies_shell_options.sh" | |
set +x; eval "${SAVED_OPTIONS}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment