/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
In reply to Re^2: The simplest (perl) filter for the job
by geohar
in thread The simplest (perl) filter for the job
by geohar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |