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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-04-2009
wbshrk wbshrk is offline
Registered User
 

Join Date: Oct 2009
Posts: 8
Count line Length

I am trying to write a shell scrip that can give me the line length of a record that was in EBDIC and then converted to ASCII. Everything I try reports 1 yet the length is 2000+. I have tried

echo "Line length : ${#FILE}"
echo "FILE" |awk -F, '{print NF}'
awk '{lenth(file)}'

All I can tell is that there is a charcter or something that says end of line even i it is not end of line.

Can anyone give me another way to count every character in a line until the line break?
Sponsored Links