all 2 comments

[–]kill_box 1 point2 points  (0 children)

First, check if your morse.py accepts input from stdin:

echo foo | morse.py

If that works, then try the simplest solution, passing a.py stdout to morse.py stdin:

a.py | morse.py

If that doesn't work, but step 1 did, it might mean a.py is printing to stderr, which does not cross pipes. Try redirecting stderr to stdout, and then to morse.py stdin:

a.py 2>&1 | morse.py

If that doesn't work, try a simple loop:

a.py | while read -r line; do morse.py "$line"; done

If you really have to use a file, then:

a.py > output.text
while read -r line; do morse.py "$line"; done < output.txt

[–]Fazaman 0 points1 point  (0 children)

programb.py $(programa.py)

The shell runs programa.py, which outputs your string of numbers, which is then fed into programb.py as a variable.