changeset 10309:86254e96a14f

<oerjan> fetch bin/spam http://slbkbs.org:5196/get?path=/hackenv/bin/spam
author HackBot
date Fri, 17 Feb 2017 18:47:08 +0000
parents 520f4f114d5d
children fc068f57c09a
files bin/spam
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/spam	Fri Feb 17 04:42:13 2017 +0000
+++ b/bin/spam	Fri Feb 17 18:47:08 2017 +0000
@@ -1,1 +1,1 @@
-line="${1-$(cat /hackenv/tmp/spline)}"; len="$(wc -l /hackenv/tmp/spout | awk '{print $1}')"; echo -n "$line/$len:"; sed -n "${line}{p;q}" /hackenv/tmp/spout; echo "$((line<len?line+1:1))" > /hackenv/tmp/spline
+line="${1-$(cat /hackenv/tmp/spline)}"; len="$(awk 'END{print NR}' /hackenv/tmp/spout)"; echo -n "$line/$len:"; sed -n "${line}{p;q}" /hackenv/tmp/spout; echo "$((line<len?line+1:1))" > /hackenv/tmp/spline