![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Based on num of records in file1 need to check records in file2 to set some condns | mavesum | Shell Programming and Scripting | 3 | 11-26-2008 10:48 AM |
| replaying a record count with another record count | er_zeeshan05 | Shell Programming and Scripting | 2 | 10-30-2008 12:14 AM |
| Parsing records from one record | bwrynz1 | UNIX for Advanced & Expert Users | 1 | 03-10-2008 10:54 AM |
| Count No of Records in File without counting Header and Trailer Records | guiguy | Shell Programming and Scripting | 2 | 06-07-2007 12:15 PM |
| How to count the record count in an EBCDIC file. | oracle8 | UNIX for Dummies Questions & Answers | 1 | 07-26-2006 07:22 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Record count based on a keyword in the records
Hi,
Am having files with many records, i need to count and display the number of records based on the keyword in one of the column of the records. for e.g THE FILE CONTAINS TWO RECORDS LIKE. 200903031143150 0 1236060795054357lessrv1 BSNLSERVICE1 BSNLSERVICE1 2128 FRAMEWORK slir 0 SUCCESS 919445393337 477 352 WGS84 200903031143150 0 1236060795054357lessrv1 RTMS RTMS 2128 FRAMEWORK slir 0 SUCCESS 919445393337 477 352 WGS84 I NEED TO COUNT THE NO OF RECORDS BASED ON COLUMN NO 4(BSNLSERVICE1) AND DISPLAY CAN ANY ONE HELP ME OUT AEMUNATHAN |
|
||||
|
am getting zero as the result...but records are there
cat 1236062198899.7372.tmp | cut -f5 -d "" | grep BSNLSERVICE1 | wc -l 0 cat 1236062198899.7372.tmp | cut -f4 -d "" | grep BSNLSERVICE1 | wc -l 0 Last edited by aemunathan; 03-03-2009 at 03:24 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|