I am trying to direct a stream of data to a wls
script in a command line environment. Wolframscript provides the $ScriptInputString
symbol to read stdin
. However, when the input is large, no input is apparently read.
How do I read from the standard input for large sizes?
Minimal (not) working example:
for i in $(seq 0 $SIZE); do echo $i; done | wolframscript -print -c \$ScriptInputString
When $SIZE=100000
(one hundred thousand), outputs all integers from 0
to 1000000
. When $SIZE=1000000
(one million), outputs nothing.
$Version
is 11.3.0 for Linux x86 (64-bit) (March 7, 2018)