dirlisting.dcgi - geomyidae - A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae) | |
git clone git://r-36.net/geomyidae | |
Log | |
Files | |
Refs | |
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]\r\n" 18 done 19 |