Realized later that it must be a difference in the system environment variables between an interactive shell session and sclang. Then I saw in the plp repository sources that this source command can only run in a shell.
So I opened a new shell and listed all the environment variables. Then, applied the source changes and listed them all again. An Emacs ediff-buffers session later, and I had 4 variables that had changed.
So… 1/ run those 4 setenv calls in sclang; 2/ remove the source line from the shell script. 3/ Try the Pipe again in sclang and … got the stdout text.
Posting for posterity – initially a quite confusing situation.
hjh
PS I might post the full result later. The math involved is definitely a pretty gross hack though; I’ve doubts about airing laundry that’s this dirty lol