in reply to manipulation of ps command output
but I think what you really want is split and join (or $" or $,). Some golfing gives:open PS, 'ps -ef -o pid,ppid,pgid,user |' or die; while (<PS>) { tr/ //s; s/^ //; print; } close PS or die;
#!/bin/sh ps -ef -o pid,ppid,pgid,user | /usr/bin/perl -lape '$_="@F"'
--
LP^>
|
|---|