If text lines of indeterminate width had in a file had text "Line-to-reorder", and I only wanted to flip and display the order of the first three tokens I can do:
# cat file.txt | awk '/Line-to-reorder/ { print $3 $2 $1 }'
How can I let lines of text that don't have the matching criteria pass through unaltered?
Secondly, How can I display the remainder of the tokens (the remainder of the line) on the matched line?
(awk is the tool of choice since my embedded system's busybox implementation has it.)