changeset 9761:81aca248b0d7

<oerjan> sled bin/spam//s,sed [^p]*p,sed "${line}q;d,
author HackBot
date Tue, 22 Nov 2016 04:20:54 +0000
parents 83dbc3f29f45
children a4471ad96662
files bin/spam
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/spam	Tue Nov 22 03:53:11 2016 +0000
+++ b/bin/spam	Tue Nov 22 04:20:54 2016 +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" /hackenv/tmp/spout; echo "$((line+1))" > /hackenv/tmp/spline
+line="${1-$(cat /hackenv/tmp/spline)}"; len="$(wc -l /hackenv/tmp/spout | awk '{print $1}')"; echo -n "$line/$len:"; sed "${line}q;d" /hackenv/tmp/spout; echo "$((line+1))" > /hackenv/tmp/spline