Hi,
S Mathias wrote:
I just can't google for it:
I'm searching for a "bash" "one liner" (awk, perl, or anything) for this:
there are text files, in several directories:
mkdir one
mkdir two
mkdir three
echo "word1 word2 word3" > one/asf.txt
echo "word2 word4, word5" > one/asfcxv saf.txt
ec
On Thu, 30 Dec 2010 10:34:59 -0800, S Mathias wrote:
> I just can't google for it:
(...)
Just out of curiosity... why not? :-?
http://www.google.com/search?hl=en&complete=0&biw=1280&bih=839&&sa=X&ei=WpodTYuiIImi8QORlqXrBQ&ved=0CBYQvwUoAQ&q=bash+count+word+occurrences+in+files&spell=1
Greetings
>> On Thu, 30 Dec 2010 10:34:59 -0800 (PST),
>> S Mathias said:
S> ...recursively count the words occurrence in the text files.
This assumes words consist of alphanumeric characters only. If that's
not the case, you'll need to change the "tr/&quo
S Mathias wrote:
> *recursively count the words occurrence in the text files like: "word1 2"
> can anyone point to a howto/link? [re: i just can't google for it :\]
What are you actually trying to do? Neither your example nor your
description makes any sense, here.
Are
On Thu, Dec 30, 2010 at 10:34 -0800, S Mathias wrote:
> I just can't google for it:
> I'm searching for a "bash" "one liner" (awk, perl, or anything) for this:
> there are text files, in several directories:
[…]
How do you define a word?
--
.''`. Wolodja Wentland
: :' :
`. `'`
ot; > two/ergd.txt
>
> echo "asdf, word2" > three/werdf.txt
> echo "word7, word8 word9 word10" > three/qwerb erfsdgdsg.txt
> echo "word4 word3" > three/web erg as.txt
>
> so it does the magic* "recursively":
>
> $ SOMEMAGI
echo "word4 word3" > three/web erg as.txt
so it does the magic* "recursively":
$ SOMEMAGIC > output.txt
cat output.txt
asdf 1
word1 2
word2 4
word3 3
word4 2
word5 1
word6 2
word7 1
word8 1
word9 1
word10 1
$
*recursively count the words occurrence in the text f
7 matches
Mail list logo