10-13-2004 04:53 AM
I'm trying to write kal script. Our service returns response in this form:
status="0" version 1.0
or
status="1" version 1.0
I'm able to connect to, but I need to write
somethink like
socket waitfor ${SOCKET} "status="1""
But it causes syntax error. I tried \"1\", \'1\', ""1"", but nothing works.
Does anyone have idea how to write this?
Solved! Go to Solution.
10-14-2004 03:49 AM
you could also provide hexadecimal value instead of text using the option 'raw' at the end of the socket command.
Regards,
Gilles.
10-13-2004 08:24 PM
Try:
socket waitfor $(SOCKET) "status=\'1\'"
or
socket waitfor $(SOCKET) "status='1'"
~Zach
10-14-2004 03:49 AM
you could also provide hexadecimal value instead of text using the option 'raw' at the end of the socket command.
Regards,
Gilles.
10-15-2004 03:24 AM
It works, thank you.
Note:
hexa codes have to be without 0x, so for
word 'status' I have to wait for:
! s t a t u s
socket waitfor ${SOCKET} "737461747573" raw
10-15-2004 03:09 AM
It doesn't work. I think, that \' sequence is interpreted as " only by echo command. If you try
set EXIT_MSG "Test \'"
and script ends with error, you will see
Test \'
But if you do the same with echo, you will se
Test "
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide