#!/bin/sh

cd /proc
for p in [0-9]*
do
    proc=$(cat $p/cmdline)
    user=$(ls -ld $p | cut -d\  -f3)

    echo "$user $p $proc"
done

