How to find and print out English words contained in a file via linux command line?
Thanks
|
How to find and print out English words contained in a file via linux command line? Thanks |
||||
|
|
|
GNU grep has the following options:
This outputs strings found one-per-line.
Here |
|||
|
|
|
He, funny !
Output :
The cracklib-small file comes with the package |
|||||||||||
|
|
You can take advantage from the fact that word lists are already sorted (however on my system, it seems at least the british-english one has been sorted in the POSIX/C locale even though it's UTF-8 encoded):
You may also want to convert everything lowercase or uppercase beforehand if you want to look for words in a case-insensistive manner. |
||||
|
found 382 words (case insensitive) in time:
|
||||
|
|