Sponsored Content
Top Forums UNIX for Dummies Questions & Answers counting lines and showing the output Post 54101 by jjoves on Monday 2nd of August 2004 02:49:52 PM
Old 08-02-2004
I think i have to rephrase my question:

Input File
Field1 - Field2 - Field3 - Field4
A - B - C - 1
A - B - C - 2
A - B - C - 3
A - B - C - 4
A - B - C - 5
A - B - D - 1
A - B - D - 2
A - B - D - 3
A - B - D - 4
E - F - G - 1
E - F - G - 2

Output file
A - B - C -> 5 --- Since the third field appeared 5 times
A - B - D -> 4
E - F - G - > 2

My sort depends on the field - each field changes.

THANKS ALOT
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with showing the difference in two lines of input

I would like my script to be able to tell the difference between to lines of input, like: Input 1: 1 2 3 4 5 Input 2: 1 2 3 4 5 6 I want the script to tell me that the difference between the two lines is the 6. Is there anyway I can have it do this? Here's an example of what my script... (12 Replies)
Discussion started by: Kweekwom
12 Replies

2. Shell Programming and Scripting

Counting lines for each application

Hi All, I have a output that suppose to be like this (see below please) App : Line counts === ================== AAA: 100 BBB: 201 CCC: 137 DDD: 32 EEE: 55 for i in `ps -ef | grep App`; do print $i; done This only shows App : === (12 Replies)
Discussion started by: Beginer0705
12 Replies

3. Shell Programming and Scripting

Showing the first 4 lines of a file?

Is there a way to show the first 4 lines of a file without using head -4? In sed would it be sed '1,4d' ? What if I just wanted to display the 2nd line ONLY? How could this be done with AWK?...correctly with SED? (6 Replies)
Discussion started by: puttster
6 Replies

4. UNIX for Dummies Questions & Answers

HELP! showing output as a ratio in uniq

Hi, I have the following file called addresses, (it is a large file i have only copy and pasted few of the data below) and I am wanting to write a command so it will Find the ratio of mobile (07....) to land line (01....) telephone numbers? then find the most popular first name and list the... (1 Reply)
Discussion started by: tina_2010
1 Replies

5. UNIX for Dummies Questions & Answers

Counting # of lines

Counting number of lines: sp I am trying to figure out a script to count the number of text files in cywig and have it give me a number (as the answer) any help would be appreciated. I am new here, so be gentle :D (3 Replies)
Discussion started by: unicksjp
3 Replies

6. Solaris

Showing strange size in df output

Hi, This is Solaris-10 box and in few of file-system (root file-system of non global zones), usage/available is not showing correct size. I am not able to figure out, what is eating up this space. Global Server - bdrpod01 Non Global zone - bdrpod01-zputq01 root@bdrpod01:/root# df -h... (2 Replies)
Discussion started by: solaris_1977
2 Replies

7. Shell Programming and Scripting

Now showing the correct output

Hello I am working on one script where I am trying to display all the directories which is inside the workspace but somehow it is giving me weird output and this is occurring only with one directory other also having the result.html file inside the directory. for i in `ls -1 | egrep -iv... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

8. UNIX for Dummies Questions & Answers

Command showing no output!

Hi Folks, I have a situation here, where no command is giving any output, and it's not even showing any error message also. What could be the reason? (3 Replies)
Discussion started by: nixhead
3 Replies

9. Shell Programming and Scripting

Script showing incorrect output

Hello scripting geeks, I am new to scripting and facing some issues in writing the logic of the script. Request your kind help here Actually when i run a command i get o/p as below o/p : 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 these are hex values i guess...now i want to... (15 Replies)
Discussion started by: kulvant29
15 Replies

10. Shell Programming and Scripting

Pgrep not showing desired output

I am searching for a process that should be up and running. Im using the following command ps -ef | grep elasticsearch to get elastic+ 1673 1 0 Jan29 ? 05:08:56 /bin/java -Xms4g -Xmx4g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
sane-pie(5)						   SANE Scanner Access Now Easy 					       sane-pie(5)

NAME
sane-pie - SANE backend for PIE, Devcom and AdLib SCSI flatbed scanners DESCRIPTION
The sane-pie library implements a SANE (Scanner Access Now Easy) backend that provides access to PIE, Devcom and AdLib SCSI flatbed scan- ners. At present, the following scanners should work with this backend: Model: Status ---------------------- ------ Devcom 9636PRO OK Devcom 9636S Untested Devcom 9630S Untested ScanAce 1236S Untested ScanAce 1230S Untested ScanAce II Untested ScanAce III OK ScanAce Plus Untested ScanAce II Plus Untested ScanAce III Plus Untested ScanAce V Untested ScanAce ScanMedia Untested ScanAce ScanMedia II Untested ScanAce 630S Untested ScanAce 636S Untested JetScan 630 OK JetScan 636PRO Untested FILES
/etc/sane.d/pie.conf The backend configuration file /usr/lib64/sane/libsane-pie.a The static library implementing this backend. /usr/lib64/sane/libsane-pie.so The shared library implementing this backend (present on systems that support dynamic loading). SEE ALSO
sane(7) CONTACT AND BUG-REPORTS Please send any information and bug-reports to: Simon Munton <simon@munton.demon.co.uk> 14 Jul 2008 sane-pie(5)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy