Explorar o código

replace jot(1) with os independent shell code

Jan Klemkow %!s(int64=5) %!d(string=hai) anos
pai
achega
fe9ce22d65
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      up.sh

+ 5 - 1
up.sh

@@ -3,7 +3,11 @@
 set -eu
 export POSIXLY_CORRECT=1
 
-jot 50 > tmp.log
+i=1
+while test $i -lt 50; do
+	print $i
+	i=$((i + 1))
+done > tmp.log
 
 (sleep 1; printf "\033[5;2~"; sleep 1; ) \
 	| ./ptty ./scroll tail -fn 50 tmp.log > out.log