aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unique count as a script?" Watch "Unique count as a script?" New topic
Author

Unique count as a script?

David O'Meara
Rancher

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.

Dave
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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
Rancher

Joined: Mar 06, 2001
Posts: 13459

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

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!
 
Consider Paul's rocket mass heater.
 
subject: Unique count as a script?