Skip to content

Instantly share code, notes, and snippets.

@jbranchaud
Created April 19, 2012 04:36
Show Gist options
  • Save jbranchaud/2418591 to your computer and use it in GitHub Desktop.
Save jbranchaud/2418591 to your computer and use it in GitHub Desktop.
Convert CSV to LaTeX table
# Convert a CSV like the following:
# a,b,c,d,e,f,g
# To the LaTeX table format like the following:
# {a} & {b} & {c} & {d} & {e} & {f} & {g} \\\hline
sed 's/,/} \& {/g' Table1.csv | sed 's/^/{/' | sed 's/$/} \\\\\\hline/' > Table1Format.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment