fix _make_git_tar_dir.sh - don't 'append directory' to symlinks
[cmdllinux.git] / scripts / _ls_proc_execs.sh
blobe7f7f2d2bc2ea8e0f87a014f4f7a9a2f1e294345
1 [ "$1" = "-printenv" ] && prenv=1
3 for i in /proc/[0-9]*/exe; do
4 if LNK=$(readlink $i 2> /dev/null); then
5 A=${i%/exe}
6 echo -n "${A##*/} "
7 echo "$LNK"
8 if [ ! -z "$prenv" ]; then
9 cat $A/environ | tr "\0" "\n" | xargs -r -i bash -c '[[ "{}" =~ ^.*=.*$ ]] && echo "\"{}\""'
12 done