The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #8 (permalink)  
Old 10-03-2007
vgersh99's Avatar
vgersh99 vgersh99 is online now
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 2,999
let me simplify it for you:
Code:
nawk '
    NF != 7 {
        printf("[%d] has invalid [%d] number of fields\n", FNR, NF)
    }
    $5 !~ /^[0-9]+$/ {
        printf("[%d] 5th field is invalid [%s]\n", FNR, $5)
}' ColCheckMe
Is it somewhat easier to parse/understand?
You should be able to see some of the familiar C/C++ concepts.

As far as helping others... I'm always willing to go 'extra mile' for someone who's willing to take a ride with me investing his/her/its own time investigating the "hints" given.
Having said that.... I'll close the 'brickbats' discussion.
Reply With Quote