recursively count the words occurrence in the text files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. word2" > one/dsgsdg.txt

echo "word6, word3!" > two/sdgsd dsf.txt
echo "word6" > 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":

$ 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 just can't google for it :\]


      
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux