[perl-oneline]倒序排序文件行
2019-08-05 本文已影响0人
Silver_42ac
perl -e 'open(IN, "<$ARGV[0]") or die "file can not open, $!"; my @array=<IN>;my @new=reverse @array;foreach my $el(@new){print "$el"}' file
perl -e 'open(IN, "<$ARGV[0]") or die "file can not open, $!"; my @array=<IN>;my @new=reverse @array;foreach my $el(@new){print "$el"}' file