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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-09-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,926

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 03:36 PM.. Reason: IFS for shell version adjusted