[ad_1]
Using perl from command line,
perl -ne 'push @r, $_; print(@r[2,1,0,3]), @r=() if @r==4 or eof' file
[ad_2]
solved Swap lines in a script by iteration over lines [closed]
[ad_1]
Using perl from command line,
perl -ne 'push @r, $_; print(@r[2,1,0,3]), @r=() if @r==4 or eof' file
[ad_2]
solved Swap lines in a script by iteration over lines [closed]