So we have Embedded Linux board running Linux.
We can connect to that board using telnet and that spawns shell and gives access to it.
Now I am writing a bash script where I want to run commands on that shell and get its output.
e.g. My commands are something like below command over telnet and see if that was successful or not.
test -c /dev/null
When I run it like below I always get 1
as exit status
{ test -c /dev/null; sleep 1;} | telnet <board ip addr>
If possible I don't want to use expect,
Any suggestion/pointers ?