Web server application - but also the number of times a word

but also the number of times a word occurs. You can do this by specifying the -c ( c as in count) option to the uniq command: $ tr ‘!?”:;[]{}(),.tn’ ‘ ‘ < /home/ranga/docs/ch15.doc | tr 'A-Z' 'a-z' | tr -s ' ' | tr ' ' 'n' | sort | uniq -c Sorting Numbers At this point the output is sorted alphabetically. Although this output is useful, it is much easier to determine the most frequently used words if the list is sorted by the number of times a word occurs. To obtain such a list, you need sort to sort by numeric value instead of string comparison. It would also be nice if the largest number was printed first. By default, sort prints the largest number last. To satisfy both of these requirements, you specify the -n ( n as in numeric) and -r ( r as in reverse) options to the sort command: $ tr '!?":;[]{}(),.tn' ' ' < /home/ranga/docs/ch15.doc | tr 'A-Z' 'a-z' | tr -s ' ' | tr ' ' 'n' | sort | uniq -c | sort -rn By piping the output to head, you can get an idea of what the ten most repeated words are: $ tr '!?":;[]{}(),.tn' ' ' < /home/ranga/docs/ch15.doc | tr 'A-Z' 'a-z' | tr -s ' ' | tr ' ' 'n' | sort | uniq -c | sort -rn | head 389 the 164 to 127 of 115 is 115 and 111 a 80 files 70 file 69 in 65 ' Sorting Numbers in a Different Column In the preceding output, you used the sort -rn command to sort the output by numbers because the numbers occurred in the first column instead of the second column. If the numbers occurred in any other column, this would not be possible. Suppose the output looked like the following: $ cat switched.txt files 80 file 70 is 115 and 115 a 111
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

Leave a Reply