Technical Blog Post
Abstract
Checking maximum line length on a Unix System.
Body
Many times when we're transferring to other systems or trying to import data into various software systems, we are faced with the problem that the data was not what was expected. The data may be perfectly valid but longer than expected or the data may be incorrect. You may be faced with having to write to a system the the maximum line length or block lengths are predetermined and can not be exceeded. In any case, we often need a quick way to determine line length on a Unix system. Here are two quick examples out of many to display the longest line length in a file:
using the 'wordcount ("wc")command:
wc -L <file name>
If that doesn;t work on your particular system you can also try a simple awk command to display it:
awk ' { if ( length > x ) { x = length } }END{ print x }' < filename.txt
There are many creative ways this can be done but this should get you started.
UID
ibm11123809