Created
April 22, 2014 17:26
-
-
Save 166MMX/11187603 to your computer and use it in GitHub Desktop.
pstree with enviornment variables
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
#!/bin/sh | |
sudo ps -Eaxwwo user,pid,ppid,pgid,command \ | |
| pstree -g 3 -f - \ | |
| sed -r 's/ ([A-Za-z0-9_]*=)/\n \1/g' \ | |
| sed -r '/^ (HOMEBREW_GITHUB_API_TOKEN|HOMEBREW_NO_EMOJI|JAVA_VERSION|JAVA_HOME|ANT_HOME|GRADLE_HOME|GROOVY_HOME|M2_HOME|M2|LS_OPTIONS|HISTCONTROL)=/ d' \ | |
| sed -r '/^ [A-Za-z0-9_]*PATH=/ {s/PATH=/PATH=\n /;s/:/\n /g}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment