textkit text2words text.txt ok
textkit text2words < text.txt NOK
cat text.txt | textkit text2words NOK
It's not always obvious how to use commands, as some expect file names, other accept streams, etc.
The documentation is not explicit on this point: "With no file passed in, many textkit commands default to standard in. This can be indicated explicitly by using a dash (-) to indicate standard in."
textkit text2words text.txt
oktextkit text2words < text.txt
NOKcat text.txt | textkit text2words
NOKIt's not always obvious how to use commands, as some expect file names, other accept streams, etc. The documentation is not explicit on this point: "With no file passed in, many textkit commands default to standard in. This can be indicated explicitly by using a dash (-) to indicate standard in."
(I haven't found how to use
text2words
on STDIN.)