![]() |
|
|
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 |
| total number of lines in a file | Raynon | Shell Programming and Scripting | 9 | 10-04-2007 10:13 AM |
| Cut Number which appear before a delimiter | Raynon | Shell Programming and Scripting | 2 | 09-30-2007 09:40 PM |
| total number of lines | mahabunta | Shell Programming and Scripting | 4 | 01-31-2007 05:11 AM |
| Select matches between line number and end of file? | Jerrad | Shell Programming and Scripting | 4 | 05-24-2006 08:50 AM |
| ls I do not want to display total with ls | rx82000 | Shell Programming and Scripting | 3 | 11-17-2005 06:16 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Display LineNo Incase Total Number Of Delimiter Does Not Not matches in a given variable
I have many files .dat extension.
requirement is to display line no if no of delimiter does not matches in a given variable lets say File: REF_BETOS.dat HCPCS_OR_CPT_CODE~BETOS_CODE~TERMINATION_DATE 0001F~Z2~ 0003T~I4~B20061231 0005F~Z2~~~ 0008T~P8~B20061231 0008T~P8~B20061231~feess 00100~P0~ Delimiter=2 Output should display the filename and lineno your help is appreciated I am trying with statment awk -F"$Delimiter" '{print NR NF-1}'; OutPut should look like File Name Line No REF_BETOS.dat 4 REF_BETOS.dat 6 Last edited by ainuddin; 10-23-2009 at 11:29 AM.. Reason: Thread tital should be "Delimiter Does Not matches" |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|