Pipe-ing the output of a task
smp wrote on Sep 04, 2009
Hi,
(1)
In my procedure script, I want to pipe the output of the task IMARITH to a string variable and then to print the value of this variable. I have following segment of code:
This does not work saying that "access to the undefined variable"
If I do the following,
then , user is prompted to type the input for this task. But I do not want this
prompt.
(2)
Can I pipe operand1/operand2 to a variable and then print its value?
Thanks and Regards
smp
(1)
In my procedure script, I want to pipe the output of the task IMARITH to a string variable and then to print the value of this variable. I have following segment of code:
string str, s
:
imarith(operand1 = str, op = "/", operand2 = x, result = "normflat.fits", v-) | scan(s)
print(s)
:This does not work saying that "access to the undefined variable"
If I do the following,
string str, s
:
imarith(operand1 = str, op = "/", operand2 = x, result = "normflat.fits", v-)
print(imarith.result) | scan(s)
print(s)
:then , user is prompted to type the input for this task. But I do not want this
prompt.
(2)
Can I pipe operand1/operand2 to a variable and then print its value?
Thanks and Regards
smp
Mike Fitzpatrick wrote on Sep 04, 2009
I'm not sure what you're trying to do: IMARITH doesn't normally produce any output so piping the result won't get you anything. What are you expecting to be in the 's' variable when you're done?
smp wrote on Sep 04, 2009
I was expecting "result" of IMARITH in "s" variable.
regards
smp
regards
smp
Mike Fitzpatrick wrote on Sep 04, 2009
If by 'result' you mean the image pixels, the task doesn't work that way. If you meant the name of the resulting image, you supplied that to the IMARITH task so you can set the variable 's' just as easily. Imarith doesn't normally write anything to the terminal, so it won't write anything to a pipe for you to scan from.
smp wrote on Sep 04, 2009
(By "result" I meant, name of the resulting image.)
Okay. thanks.
regards
swapnil
Okay. thanks.
regards
swapnil
Last post on Sep 04, 2009