I have a file with many curly bracketed words, ex. {test1}, {test2} - how would I grep
for these words and output a distinct list of them?
output example:
{test1}
{test2}
I've tried this which didn't work:
grep -o {.*} file.xml | sort | uniq
UPDATE
Actually - this seems to have worked:
grep -oP '{.*?}' file.xml | sort | uniq