Created
March 14, 2012 08:51
-
-
Save digitalex/2035199 to your computer and use it in GitHub Desktop.
Order fields so the shortest is first
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| awk 'length($1) > length($2) {tmp = $2; $2 = $1; $1 = tmp} {print $0}' input.log > output.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment