I'm new to shell-scripting and I guess this should be something quite easy. Anyway I don't know how to force redirect a program's output to the input of another program. I know about the pipe, where you can do
program1 | program2
But in my case, I guess the output of program1 is already redirected somewhere else (this is a long script that someone else wrote). When I tried on a separate command prompt, the result is as expected, but when I put it inside the script
program2 gets upset about missing parameters. Can I somehow force it?