Add random link script for better tracking. - gopher-lawn - The gopher lawn gop… | |
git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhf… | |
Log | |
Files | |
Refs | |
Tags | |
--- | |
commit f4e5eb91b00a8a104596a4dcb75b059bec1d043a | |
parent dd30c3a05562b2ca640fc70fa9afbe749095d001 | |
Author: Christoph Lohmann <[email protected]> | |
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(-) | |
--- | |
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" | |
+ |