You can also call set
without any arguments to add a list of all of the shell's currently set variables - also quoted for reentry to the shell. And you can - in bash - additionally add the command typeset -fp
to also include all currently declared shell functions. You can lump it all together and eval
when ready. You can even call alias
without arguments for more of the same. That... might cover it, though. I guess there is "$@"
- which you'd have to put in a bash
array first, I suppose, before doing set
.
incorporate nkatsar's comment to fix shopt command, plus some noise to get 6 total characters difference
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/