perl -e 'push @file,$_ while<>;print sort {$a <=> $b} @file' test.txt