Mercurial > hg > config
view bin/procenv.sh @ 562:8d28fce0a6d6
detect scripts; namely x-tile
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 11 Dec 2013 02:52:53 -0800 |
parents | 481b55fc4b96 |
children |
line wrap: on
line source
#!/bin/bash # process environment # list process environment variables # must be run as root if [[ "$(whoami)" != "root" ]] then echo "must be run as root" exit 1 fi # loop over arguments for PROG in $@ do EXIT=0 if PID=$(pidof -x ${PROG}) then echo '='${PROG}: ${PID}'=' cat /proc/${PID}/environ | tr '\000' '\012' | sort else EXIT=1 echo "" fi done