title: Awk - Help Print Record Number Of Found Result
body: <p>Ultimately I am wanting to verify all record lengths are equal to a preset length in a text file.
  Such as, user inputs a record length of 20.
  The script would check every line to make sure none are lower OR higher than 20 in length.</p>
  
  <p>IF a record is found ... report the record number and print the record.
  (what I don't know how to do is report the record number of the found result)</p>
  
  <p>What I have so far is a batch script that has this:</p>
  
  <pre><code>"C:\Program Files (x86)\GnuWin32\bin\awk.exe" "length($0) &lt; %CorrectLength%" %1
  
  "C:\Program Files (x86)\GnuWin32\bin\awk.exe" "length($0) &gt; %CorrectLength%" %1
  </code></pre>
  
  <p>%correctlength% is the amount the user will input.</p>
  
  <p>Obviously these two commands will print any lines that are less than X or more than X...</p>
  
  <p>How do I get it to also print the record number of the found results?
  And is there a way I can make it do both of these commands in a single line?</p>