Hello monks!
Here's the picture: I have a very large file with a lot of file names in it. Like this:
cln2-test.pl
labsearch.txt
listprojects.pl
server1-test.pl
(17).SWW
(18).SWW
(19).SWW
(2).SWW
(20).SWW
(21).SWW
(22).SWW
(23).SWW
(24).SWW
(25).SWW
(26).SWW
(3).SWW
(4).SWW
(5).SWW
(6).SWW
(7).SWW
(8).SWW
(9).SWW
2689previous.gif
2690next.gif
a
a.out
bbb
book_details
c1
c2
c3
charcut
check_dupvar
club
common
cpgm_check
ctest
ctest1
ctest2
activepj.pl
autopro.exe
AutoPro.pl
getbylabel.exe
getbylabel.pl
getbylabel2.exe
getbylabel2.pl
.
.
.
.
.
.
..
As you can see, most of the files end with extensions. What i want is to produce a report in this way:
Extension: No. of files
.txt 3
.pl 10
.exe 17
. 4
. .
.
The file extensions are not pre-determined. They are updated in the log as they are read from the file.
Thanks for your time
we're born with our eyes closed and our mouths wide open, and we spend our entire life trying to rectify that mistake of nature. - anonymous.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.