Last active
October 10, 2022 04:02
-
-
Save xbalaji/67eb9cf3e6d231d3a8ab8f5145adccba to your computer and use it in GitHub Desktop.
generate a quick index.html page including sub directories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# oneliners-generate-index-html.sh | |
# this takes care of sub directories as well, adds a table with row numbers, easy for reference | |
# wrote this script for generating pages in gitlab :) | |
find . -type f | sort | awk 'BEGIN {print "<html><body><table align=center border=1>"} {printf "<tr><td>%d<td><a href=\"%s\">%s</a>\n", FNR, $0, $0 } END {print "</table></body></html>"}' > index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment