The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-23-2009
ainuddin ainuddin is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 15
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0