On 06/04/2020 13.18, Istvan Gabor wrote:
Hello:
I have a program that can send its output to a script. I can setup the script command in the program as: <script-name> option1 option2 ..., eg: myscript.sh name time.
I know that I can get the options in the script using $1 and $2 etc.
But how can I get the program's output that is sent to the script? I would like to write to output to a file.
I also would like to use the program's output to different purposes. Can I store it in a variable and use it later, or do I have to save it in a temporary file?
The problem is that the phrase "I have a program that can send its output to a script." is so vague as to be useless. We can not know how does the program sends its output. For example, the program might call the script and pass the data in a pipe. Or it might call the script and pass the data in a file, passing the file name as a parameter. Or it might be as big enough parameters. You really have to look up that program documentation. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)