Skip to content

Instantly share code, notes, and snippets.

@paulboardman
Created June 21, 2013 10:26
Show Gist options
  • Save paulboardman/5830333 to your computer and use it in GitHub Desktop.
Save paulboardman/5830333 to your computer and use it in GitHub Desktop.
Example use of the $'...' quoting construct in bash.
echo -e "second:first" |\
cut -d: --output-delimiter=$'\t' -f 1,2 |\
awk -F $'\t' 'BEGIN{OFS=FS}{print $2,$1}'
# outputs: "first<tab>second"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment