I have a block of text that I want to cat into bash and then send to python so I can work with it more.
So my command line is
cat input_file | sh bash_file.sh
My sh file is
#!/bin/sh input_data=$(cat) "$input_data" | python3 ./python_file.py
and my python file is
contents = sys.stdin.read() print(contents)
But nothing is actually getting stored to contents. How can I print out what I have catted into my shell script file from python?