On 13/07/10 16:54, Brett Parker wrote:
But, Martijn has a neater solution in the form: grep -E -o '$\w+' file.txt
Just beaten to the post! But I'll post my version in case it's useful:
grep -oE '$\w+' file.txt | sort -u
-E enables regex matching -o tells grep to only output the match (not the whole line) sort sorts the results, -u removes duplicates