On 8 Feb 2008, at 02:32, Andy Lester wrote:
On Feb 7, 2008, at 8:28 PM, Andy Armstrong wrote:ack -h '^use\s+\w+' | perl -pe 's/^use\s+(\w+(?:::\w+)*).*/$1/' | sort -uGreat minds think alike, except that you don't need to be doing that Perl stuff. The --output flag for ack is your friend.
So bringing them together: ack -h '^use\s+(\w+(?:::\w+)*).*' --output=\$1 | sort -u /me saves in ~/bin as 'uses' :) -- Andy Armstrong, Hexten