Skip to content

Instantly share code, notes, and snippets.

@loretoparisi
Created January 10, 2018 11:00
Show Gist options
  • Save loretoparisi/93f70a2fd1d301003bfd2c67f5aeaff4 to your computer and use it in GitHub Desktop.
Save loretoparisi/93f70a2fd1d301003bfd2c67f5aeaff4 to your computer and use it in GitHub Desktop.
AWK Print Columns by Range and Column Substring
awk -F"," 'BEGIN { OFS="" ; ORS="" } ; { for (i=1; i<9; i++ ) print $i ","; print substr($NF,0,20) "\n"}' file.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment