If you look at the dictionary entry for length you’ll see that it’s a function. You say either: sort fld 1 by the length of each or: sort fld 1 by length(each) but not: sort fld 1 by length of each