How can i read all the unique words in a file, i used -
cat comment_file.txt | /usr/xpg6/bin/tr -sc 'A-Za-z' '/012'
and
cat comment_file.txt | /usr/xpg6/bin/tr -sdc 'A-Za-z' '/012'
but they didnt worked.....
How can i read all the unique words in a file, i used -
cat comment_file.txt | /usr/xpg6/bin/tr -sc 'A-Za-z' '/012'
and
cat comment_file.txt | /usr/xpg6/bin/tr -sdc 'A-Za-z' '/012'
but they didnt worked.....
Does uniq somefile help?
yes u will be using uniq only but the first part is not working i used -
cat comment_file.txt | /usr/xpg6/bin/tr -sdc 'A-Za-z' '/012' | sort | uniq -c
This one from the archives may help. Although it shows non-unique non-unique words you would need to tweak it.
thankx anyways
this is the solution ---
cat comment_file.txt | tr " " "\n" | sort | uniq -c | wc -l
:o