1). !($0 in array) : if the entire line Not in the array, then;
2). {array[$0]; print} : put the entire line into the array as a element, then print it out, meanwhile;
3). {cnt++; print cnt} : count the new line numbers, then print out the count num.
======In short, the same as: >
a). !a[$0]: if a[$0] not already exists in the array a[], print it out, then;
b). (!a[$0])++ : move to next line;
网友评论