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=encomplete=0biw=1280bih=839sa=Xei=WpodTYuiIImi8QORlqXrBQved=0CBYQvwUoAQq=bash+count+word+occurrences+in+filesspell=1
Greetings,
--
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
echo word1.
word4 2
word5 1
word6 2
word7 1
word8 1
word9 1
word10 1
$
*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 :\]
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject
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 files like:
word1 2 can anyone point to a howto/link? [re: i
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 Wentlandwolodja.wentl...@ed.ac.uk
S Mathias smathias1...@yahoo.com 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 you
On Thu, 30 Dec 2010 10:34:59 -0800 (PST),
S Mathias smathias1...@yahoo.com 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/ line in the script.
me
7 matches
Mail list logo