perl -le "$mask = 0x2b; print for map {$mask >>= 1?$_:();} @ARGV" and you will be pleased with the results