to make groupings of object using unix command

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers to make groupings of object using unix command
# 1  
Old 08-03-2007
Java to make groupings of object using unix command

suppose u have a file

so output should be lie that one for groupings...
means how many times 1 has come in this file
1 4
2 4
4 1
5 1
-3 3
-4 2
means -4 has come 2 times...
# 2  
Old 08-03-2007
sort input_file | uniq -c

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

C object code compatiblity with UNIX and Linux

Is it possible to use an object code compiled on Unix- sun Os sparc on Redhat linux OS. In our new application we have to create object file on Unix os and then use the object code on Linux OS to compile pro*c code but when we are trying to achieve this we get error: file in wrong format. how can... (3 Replies)
Discussion started by: vivek chaudhary
3 Replies

2. Programming

How to initialize an object with another object of different class?

How to initialize an object of class say "A", with an object of type say "B". The following code give the error message "error: conversion from A to non-scalar type B requested" #include <iostream> using namespace std; class B; class A{ public: A() { cout <<"\nA()" << endl; } ... (1 Reply)
Discussion started by: techmonk
1 Replies

3. Shell Programming and Scripting

Homework: Make a one-line Unix command - using pipe(s)

Task A: Make a one-line Unix command - using pipe(s) - to display the number of files in your home directory including the hidden files that begin with '.' Task B:Make a one-line Unix command - using pipe(s) - to display the number of unique zip codes in famous.dat (hint: use -u on sort) Task... (1 Reply)
Discussion started by: wises
1 Replies

4. Shell Programming and Scripting

Creating CLOB object in unix

Hi All, I have a big file (basically .log file) want to store in oracle database. Please help me in preparing CLOB object in unix. The log file is stored in some location on unix file server, prepare clob of that file and store in DB. Any sample code or link Thanks Rajesh (1 Reply)
Discussion started by: rajeshorpu
1 Replies

5. UNIX for Dummies Questions & Answers

Object reference not set to an instance of an object

I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine. I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this. Here is my function: <?php function TRECSend($a, $b, $c, $d,... (0 Replies)
Discussion started by: EddiRae
0 Replies

6. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies

7. Shell Programming and Scripting

Reorder the sequence of line groupings/QIF export

Hi All, I need to reorder the sequence of line groupings - specifically the output from a bank QIF (Quicken Interchange Format) export. Sample is like this: !Type:Bank D12/05/2008 T-10.00 N1 Details of Charge 1 ^ D07/05/2008 T-20.00 N2 Details of Charge 2 ^ D17/04/2008 T-30.00 (0 Replies)
Discussion started by: mark101
0 Replies

8. UNIX for Advanced & Expert Users

Ostream object is not printing message on HP-UNIX for debug mode

The following C++ code segment is not working in debug mode build on HP-UNIX machine. It is not printing "Hello World" message on the screen. While it is working fine in release mode build. ============================================== class KLogStreamBuf : public streambuf { public:... (0 Replies)
Discussion started by: heena
0 Replies

9. Shell Programming and Scripting

Splitting a file into groupings of 20 entries

I have a file that is dynamic in length, and I need to parse the second field out of it, then split that into groupings of 20 entries and echo a variable above each grouping of 20. The script is written in bash. I am sure there is a way to use awk, but my awk book is at home, and I am out of town.... (1 Reply)
Discussion started by: 98_1LE
1 Replies

10. Programming

How can I make ls -l in HP-UNIX?

I made a liitle source about that.. BUt I got a trouble when making files'authority.. How can I display them?? p.s.) used struct stat .. (1 Reply)
Discussion started by: sangjinn
1 Replies
Login or Register to Ask a Question

Featured Tech Videos