Skip to content

Instantly share code, notes, and snippets.

@ejoubaud
Created August 26, 2014 10:40
Show Gist options
  • Save ejoubaud/e053bfd18c794c7132ec to your computer and use it in GitHub Desktop.
Save ejoubaud/e053bfd18c794c7132ec to your computer and use it in GitHub Desktop.
Turn 1-per-line list of values into a 10-per-line comma-separated list of values
awk 'FNR%10!=0 {printf "%d, ",$1} FNR%10==0 {print $1}' file_with_one_val_per_line.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment