Skip to main content
Rollback to Revision 2
Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

The quick brown fox jumped over the lazy dog Get text-file word occurrence count of all words & print output sorted

The quick brown fox jumped overI had a command which would work through a text file, count all the lazy dogoccurrences of the words and print it out like this:

user@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5:  internet
3:  sh
1: GNU/Linux

So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere on the internets a long time ago, but I cannot find or remember it..

The quick brown fox jumped over the lazy dog

The quick brown fox jumped over the lazy dog.

Get text-file word occurrence count of all words & print output sorted

I had a command which would work through a text file, count all the occurrences of the words and print it out like this:

user@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5:  internet
3:  sh
1: GNU/Linux

So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere on the internets a long time ago, but I cannot find or remember it..

deleted 480 characters in body; edited title
Source Link
user2909
user2909

Get text-file word occurrence count of all words & print output sorted The quick brown fox jumped over the lazy dog

I had a command which would work through a text file, count all the occurrences of the words and print it out like this:

user@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5:  internet
3:  sh
1: GNU/Linux

So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere onThe quick brown fox jumped over the internets a long time ago, but I cannot find or remember it.lazy dog.

Get text-file word occurrence count of all words & print output sorted

I had a command which would work through a text file, count all the occurrences of the words and print it out like this:

user@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5:  internet
3:  sh
1: GNU/Linux

So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere on the internets a long time ago, but I cannot find or remember it..

The quick brown fox jumped over the lazy dog

The quick brown fox jumped over the lazy dog.

edited body
Source Link
user2909
user2909

I had a command which would work through a text file, count all the occurrences of the words and print it out like this:

remy@boxuser@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5:  internet
3:  sh
1: GNU/Linux

So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere on the internets a long time ago, but I cannot find or remember it..

I had a command which would work through a text file, count all the occurrences of the words and print it out like this:

remy@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5:  internet
3:  sh
1: GNU/Linux

So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere on the internets a long time ago, but I cannot find or remember it..

I had a command which would work through a text file, count all the occurrences of the words and print it out like this:

user@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5:  internet
3:  sh
1: GNU/Linux

So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere on the internets a long time ago, but I cannot find or remember it..

Source Link
user2909
user2909
Loading