in reply to Reading the contents of a file from the bottom up
MAX is set to One less than the number of entries you want(a quirk of zero-based arrays).$ export MAX=6;tac YOUR-FILE.txt | perl -lane '$seen{$_}++ or push @ou +t,$_ for @F}{print join(q| |,@out[0..$ENV{MAX}||$#out])' 21 22 23 24 17 18 19
"From there to here, from here to there, funny things are everywhere." -- Dr. Seuss
|
|---|