summaryrefslogtreecommitdiff
path: root/nocompile/bin/htmltableize
diff options
context:
space:
mode:
authorepochqwert <epoch@hacking.allowed.org>2015-06-21 23:22:47 -0500
committerepochqwert <epoch@hacking.allowed.org>2015-06-21 23:22:47 -0500
commit32231662292eb5821b411b53bbb37d2a1446c4f9 (patch)
tree469838766b5602500adbb09386a67e845e9e41f7 /nocompile/bin/htmltableize
parent9001e459e7a9024297863105a017327f224faf09 (diff)
downloadmisc-32231662292eb5821b411b53bbb37d2a1446c4f9.tar.gz
misc-32231662292eb5821b411b53bbb37d2a1446c4f9.zip
htmltablize turns output similar to ps and sockstat into tables.
Diffstat (limited to 'nocompile/bin/htmltableize')
-rwxr-xr-xnocompile/bin/htmltableize2
1 files changed, 2 insertions, 0 deletions
diff --git a/nocompile/bin/htmltableize b/nocompile/bin/htmltableize
new file mode 100755
index 0000000..0d4e099
--- /dev/null
+++ b/nocompile/bin/htmltableize
@@ -0,0 +1,2 @@
+#!/bin/sh
+sort ${2:} -k "${1:-1}" | tr -s ' ' | /usr/local/bin/encode_html_entities | sed 's/^/<tr><td>/g' | sed 's|$|</td></tr>|g' | sed 's| |</td><td>|g'