Skip to content

Instantly share code, notes, and snippets.

@tlatsas
Last active December 17, 2015 12:09
Show Gist options
  • Save tlatsas/5607478 to your computer and use it in GitHub Desktop.
Save tlatsas/5607478 to your computer and use it in GitHub Desktop.
incident report data -> latex tabular
#!/bin/sh
while read line; do
echo '\hline'
echo $line"\\\\" | sed 's/°/\\degree/' |
awk '
BEGIN{OFS=" & "}
{
print $1,$2,$3,$4$5$6$7$8,$9
}
' |
sed 's/-/ - /g'
done < "$1"
echo '\hline'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment