in reply to Re: The simplest (perl) filter for the job
in thread The simplest (perl) filter for the job
/bin/ps -axwwo command= | perl -pe '$_="" if ! /\.app\/Contents/ ; $_ += m{([^/]+\.app)/} ? "$1\n" : ""'
The expression order needs to be swapped as the previous order stripped off the /Contents before it can be matched by the second expression. Also a space after the '!' prevents tcsh trying to history-expand the search... Thanks
|
|---|