Last active
May 16, 2020 07:45
-
-
Save kakash1hatake/0b148c644a5668bf0259301395fbeb3b to your computer and use it in GitHub Desktop.
show env variables of the particular process that were created during process startup
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 | |
# | |
# show env variables of the particular process that were created during process startup. requires root privileges | |
# usage: sudo penv.sh pid | |
pid=$1 | |
awk 'BEGIN {RS="\0"; ORS="\n"} $0' "/proc/$pid/environ" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment