Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
ryanc2 said:sorry if I wasn't being clear. I need to count the length of each line in a fixed length format. The real problem I have is there are leading/trailing spaces in the file.
#! /bin/ksh
RecordLength=60
if [ $# -lt 1 ]
then
echo No files specified
else
while [ $# -gt 0 ]
do
FileName=$1
while read Line
do
if [ $( echo $Line | wc -c ) -lt $RecordLength ]
then
echo $FileName
break
fi
done < $FileName
shift
done
fi
MAX=1024
(( MAX=MAX+1 ))
cd /to/your/dir
for i in *
do
nbiglines=$(cut -c${MAX}- $i|grep -c -v "^$")
if [ ${nbiglines} -gt 0 ]
then
echo $i
fi
done