File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Unique count as a script? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unique count as a script?" Watch "Unique count as a script?" New topic

Unique count as a script?

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

While this is being done on Windows, I have some unix tools installed for most of the common commands.

My problem is:
I get a large set of data which gets parsed in various ways until it is a list of the names of soap messages, in alphabetical order eg

Is there a simple way to run a script to output
MessageOneRequest 3
MessageTwoRequest 5
or similar?

I know it would be easy in Java, but that may be out of the domain for this particular problem.

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

There's probably a better way, but I would just do

Call this with the filename as the only argument.

[Jess in Action][AskingGoodQuestions]
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Thanks, I'll give it a run later.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

It wasn't until I looked at the manual for uniq and I saw the '-c' option.

Thanks for pointing me in that direction though!
I agree. Here's the link:
subject: Unique count as a script?
Similar Threads
integrating one xhtml in another xhtml
How to avoid IllegalStateException (Response Already Commited )
script and javascript
Changing the text of a buton
External .js files again