#!/bin/sh # psuxsc - only statuses and command lines of processes listed by ps ux # S = sleeping, R = running, D = blocked ps ux | perl -ape 's/^.*$/$F[7]\t@F[10..$#F]/' # also try: ps -eo stat,args --sort stat