Op maandag 6 april 2020 13:18:50 CEST schreef Istvan Gabor:
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?
Thanks in advance,
Istvan Completely depends on the language your program is writen in. You could write to a file and use some 'while true ... ' script that looks for the existence of such (a) file(s). Most languages can also call scripts where the full command executed would be incl. defined options, i.e name = Blah; time = now(); shellexec ('path/to/script.sh $name $time);
-- Gertjan Lettink a.k.a. Knurpht openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org