Using the linux command sort
, how do you sort the lines within a text file?
Normal sort
swaps the lines until they're sorted while I want to swap the words within the lines until they're sorted.
Example:
Input.txt
z y x v t
c b a
Output.txt
t v x y z
a b c