perl -lanE "say join ' ',@F[-5,-4,-3,-2,-1]" datacolumn.txt HT000000000 123 50 70 80 H0000000000 123 50 70 80 HT000000000 123 50 70 80