I made some progress, with read-from-minibuffer
the function I need, however I want to terminate the script and suppress the error information at the end.
─○ cat text1.txt | emacs -batch --eval "(while t (princ (read-from-minibuffer \"\") (terpri)))"
Here is some text
Will it be tripled?
Here is some text
Will it be tripled?
Here is some text
Will it be tripled?
Debugger entered--Lisp error: (end-of-file "Error reading from stdin")
read-from-minibuffer("")
(princ (read-from-minibuffer "") (terpri))
(while t (princ (read-from-minibuffer "") (terpri)))
eval((while t (princ (read-from-minibuffer "") (terpri))) t)
command-line-1(("--eval" "(while t (princ (read-from-minibuffer \"\") (terpri)..."))
command-line()
normal-top-level()