- Aug
- 2,033
- 82
There was a recent post asking for a Word Count command.
Using TPIPE, I can count the number of lines in a file. Example;
Is it possible to use TPIPE to count the number of words in a file?
I was looking at the /simple=40 option, that creates a word list, but when I did;
it just gave me the first word in the text file.
I was thinking that the list could be output to a temporary file, and then use @lines[temporaryfile] to get the word count. I'm sure that TPIPE can somehow do all of this, not just sure how.
Joe
Using TPIPE, I can count the number of lines in a file. Example;
Code:
echo %@execstr[tpipe /input=mytextfile.txt /grep=5,0,0,0,1,0,0,0,"[^ \t\r\n]*"] lines
Is it possible to use TPIPE to count the number of words in a file?
I was looking at the /simple=40 option, that creates a word list, but when I did;
Code:
%@execstr[tpipe /input=mytextfile.txt /simple=40]
I was thinking that the list could be output to a temporary file, and then use @lines[temporaryfile] to get the word count. I'm sure that TPIPE can somehow do all of this, not just sure how.
Joe