The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
What the command to find out the record length of a fixed length file?
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Rules & FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
What the command to find out the record length of a fixed length file?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
10-09-2007
radoulov
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
radoulov
View Public Profile
Find all posts by radoulov