Add random link script for better tracking. - gopher-lawn - The gopher lawn gopher directory project. HTML git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-lawn/ DIR Log DIR Files DIR Refs DIR Tags --- DIR commit f4e5eb91b00a8a104596a4dcb75b059bec1d043a DIR parent dd30c3a05562b2ca640fc70fa9afbe749095d001 HTML Author: Christoph Lohmann <20h@r-36.net> Date: Fri, 28 Aug 2020 13:09:54 +0200 Add random link script for better tracking. Diffstat: A bitreich-lawn-random-link | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) --- DIR diff --git a/bitreich-lawn-random-link b/bitreich-lawn-random-link @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Thanks to parazyd for the idea! +# + +_f="$(find /br/gopher/lawn/*/ -name 'index.gph' | shuf -n1)" +_u="$(grep '^\[[0-9a-zA-Z]\{1\}|.*\]' $_f | head -n-1 | shuf -n1)" +_af="$(printf "%s\n" "$_u" | sed 's,|server|port\],|bitreich.org|70\],g')" + +printf "%s\n" "$_af" +