Last active
November 24, 2017 21:02
-
-
Save arehmandev/55901f4a560cd1e46786716a0ce43243 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/bash | |
| ( set -o posix ; set ) > vars | |
| sed -i '/BASHOPTS/d' vars | |
| sed -i '/BASH_VERSINFO/d' vars | |
| sed -i '/EUID/d' vars | |
| sed -i '/PPID/d' vars | |
| sed -i '/SHELLOPTS/d' vars | |
| sed -i '/UID/d' vars | |
| sed -i '/BASH_ARGC/d' vars | |
| sed -i '/BASH_ARGV/d' vars | |
| sed -i '/BASH_LINENO/d' vars | |
| sed -i '/BASH_SOURCE/d' vars | |
| sed -i '/IFS/d' vars | |
| cat vars | |
| for i in $(cat vars | cut -d '=' -f 1); do unset $i; done | |
| echo done | |
| env | |
| source vars | |
| env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment