Skip to content

Instantly share code, notes, and snippets.

@joec4i
Created November 3, 2014 00:15
Show Gist options
  • Save joec4i/153fd69e13731bd8d4a0 to your computer and use it in GitHub Desktop.
Save joec4i/153fd69e13731bd8d4a0 to your computer and use it in GitHub Desktop.
Move the last column to the head of each line with awk
cat devices.txt | awk '{lc=$NF; $NF=""; print lc"\t"$0}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment