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 -->
  #2 (permalink)  
Old 10-09-2007
radoulov's Avatar
radoulov radoulov is offline
addict
 

Join Date: Jan 2007
Location: Milan, Italy/Varna, Bulgaria
Posts: 1,432
Code:
awk '{print length;exit}' filename
in shell (bash, zsh, ksh93):

Code:
<filename IFS= read;echo ${#REPLY}

Last edited by radoulov; 10-09-2007 at 11:36 AM. Reason: IFS for shell version adjusted
Reply With Quote