# list all users' public_gopher directories that have been edited in the # past 60 days. # the 2>/dev/null removes all error messages from the output. # awk uses '/' as the delimiter char, and generates a link based off the fields. # -type d (directory) -mtime -60 (modified within 60 days) users_list=$(find /home/*/public_goph* -type d -mtime -60 -name "public_gopher" 2>/dev/null) users_links=$(printf "$users_list" | awk -F "/" '{print "[1|~"$3"|~"$3"|server|70]"}') out_file="$HOME/public_gopher/active-users.gph" echo "this is a list of gopherholes on tilde.pink that have been active in the past ~60 days. i run this script manually cause i don't think i'm allowed receive the directory listing in a cgi file. " > $out_file printf "$users_links\n" >> $out_file echo " [0|see the script|~emily/active-users.sh|server|70] last run on $(date "+%y-%m-%d"). " >> $out_file