dirlisting.dcgi - geomyidae - A small C-based gopherd. | |
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
dirlisting.dcgi (292B) | |
--- | |
1 #!/bin/sh | |
2 # | |
3 # Dir listing example. | |
4 # | |
5 | |
6 find . -maxdepth 1 \ | |
7 | sort -r \ | |
8 | cut -d'/' -f 2- \ | |
9 | grep -v "^\." \ | |
10 | while read -r entry; | |
11 do | |
12 entrytype="9" | |
13 [ -d "${entry}" ] && entrytype="1" | |
14 | |
15 find "${entry}" \ | |
16 -maxdepth 0 \ | |
17 -printf "[${entrytype}|%TY-%Tm-%Td %f|%f|server|port]… | |
18 done | |
19 |