Angenommen, der Header ist nicht Teil der Datei:
awk -F: ' NR == 1 length($2) > length(max) length($2) < length(min) END ' songs
longest=Rockin' in the Free World shortest=1999
RANK NAME BAND YEAR GENERE DOMESTIC/INTERNATIONAL 206:Reach Out, I'll Be There:The Four Tops:1978:Pop:3/2 207:Bye Bye Love:The Everly Brothers:1950:Classic:3/2 208:Gloria:Them:1965:Classic:1/1 209:In My Room:The Beach Boys:1985:Classic:5/7 210:96 Tears:? & the Mysterians:1964:Classic:20/15 211:Caroline, No:The Beach Boys:1975:Classic:5/7 212:1999:Prince:1958:Classic:5/7 213:Your Cheatin' Heart:Hank Williams:1988:Soul:7/6 214:Rockin' in the Free World:Neil Young:1960:Pop:5/7 215:Sh-Boom:The Chords:1967:Alternative:3/2 216:Do You Believe in Magic:The Lovin' Spoonful:1988:Classic 217:Jolene:Dolly Parton:1998:Classic:7/6 218:Boom Boom:John Lee Hooker:1966:Classic:7/6
Angenommen, der Header ist nicht Teil der Datei:
awk -F: ' NR == 1 length($2) > length(max) length($2) < length(min) END ' songs
longest=Rockin' in the Free World shortest=1999