perl -ne'print,last,if$.==4' 12345678901234567890123 23