I have a script, script1, that operates on standard input. I can call that script from script2
#!/bin/sh ./script1 script1 then operates on standard input to script2. I can also pipe some other input to script1
#!/bin/sh echo "Called from script2" | ./script1 But then ./script1 does not use the standard input at all.
What I want is to prepend the standard input to script1 by the input "Called from script2". Is this possible?
I know how to do this with a temp file, but I am wondering if there's a way to not use a temporary file.