# awk script to compute the longest line in a file. # Re-written by Eric Pement on 12 March 2003 to include # an EOL marker (Ctrl-Q, which looks like "<" on Windows). length($0) > m2 { m1 = $0 m2 = length($0) m3 = NR } END { print "Total lines:", NR ". Longest line (#" m3 ") has", m2, "characters." print "1---5---10----5---20----5---30----5---40----5---50----5---60----5---70---75" print m1 "\x11" } #--- end of script ---