Skip to content

Instantly share code, notes, and snippets.

@kakash1hatake
Last active May 16, 2020 07:45
Show Gist options
  • Save kakash1hatake/0b148c644a5668bf0259301395fbeb3b to your computer and use it in GitHub Desktop.
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
#!/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