#!/bin/sh pids="$(pgrep -x runsvdir)" for pid in $pids do ps -o pid,command --cols 1000 -p $pid echo done