Skip to content

Instantly share code, notes, and snippets.

@aheadlead aheadlead/1.awk
Created Sep 24, 2019

Embed
What would you like to do?
#!/usr/bin/env awk
BEGIN {
print "<table>"
print "\t<thead>"
print "\t\t<tr>"
print "\t\t\t<th>ver</th>"
print "\t\t\t<th>link</th>"
print "\t\t</tr>"
print "\t</thead>"
print "\t<tbody>"
}
match($0, /^ +(.*): (.*)$/, r) {
print "\t\t<tr>"
printf "\t\t\t<td>%s</td>\n", r[1]
printf "\t\t\t<td><a href=\"%s\">file</a></td>\n", r[2]
print "\t\t</tr>"
}
END {
print "\t</tbody>"
print "</table>"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.