Skip to content

Instantly share code, notes, and snippets.

@HeLiBloks
Last active April 4, 2016 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HeLiBloks/026da1fb5674b1659e9a989612a5f7af to your computer and use it in GitHub Desktop.
Save HeLiBloks/026da1fb5674b1659e9a989612a5f7af to your computer and use it in GitHub Desktop.
html table from csv file with sed
#!/bin/sh
sed -re '
s/^.*$/<tr>\n<td>&<\/td>\n<\/tr>/g
s/[,]/<\/td>\n<td>/g
1i <table style="width:100%">
$a\<\/table>' "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment