perl -ple"$_ = join'',(unpack 'A10 A4 A6 A6', $_)[ 2,1,0,3 ]" infile >outfile