🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #6977

Re: Counting and listing words

#6977
From: Christian Wetzel
Date: Fri, 17 Apr 1998 00:00
13 lines
1209 bytes
Harald Nikolaus:

> does anybody know where I can find a program, an add-on, a macro or a
> Perl module that lists alle the words in a file
> and also, how often they appear?
> Or do I have to write it myself?

If you are on Unix, try

cat textfile | perl -pe 's/(^\s+|\s+$)//g;s/\s+/\n/g;' | sort | uniq -c

Christian
Technical Details
Message-ID: <3537C289.55A9@linguistik.uni-erlangen.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6h84ks$gpp@sun0.urz.uni-heidelberg.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 106cba,8f7b76fcb76708d2
X-Google-Attributes: gid106cba,public
X-Google-Thread: 10c853,8f7b76fcb76708d2
X-Google-Attributes: gid10c853,public
X-Google-Thread: 10bba1,8f7b76fcb76708d2
X-Google-Attributes: gid10bba1,public
X-Google-Thread: 116e11,8f7b76fcb76708d2
X-Google-Attributes: gid116e11,public
From: Christian Wetzel <cnwetzel@linguistik.uni-erlangen.de>
Subject: Re: Counting and listing words
Date: 1998/04/17
Message-ID: <3537C289.55A9@linguistik.uni-erlangen.de>
X-Deja-AN: 345158778
Content-Transfer-Encoding: 7bit
References: <6h84ks$gpp@sun0.urz.uni-heidelberg.de>
Content-Type: text/plain; charset=us-ascii
Organization: CLUE -- Computerlinguistik Uni Erlangen
Mime-Version: 1.0
Newsgroups: comp.text,comp.os.ms-windows.apps.word-processing,alt.comp.editors.batch,bit.mailserv.word-pc