bash - Send command to open process in Shell file -
in bash how can issue command running process started?
for example;
# start bluez gatttool connect bluetooth device gatttool -b $mac -i connect # send 'connect' gatttool process? currently shell script doesn't connect line because gatttool process running.
if want send string "connect\n" process, can use standard pipe:
echo "connect" | gatttool -b $mac -i if want engage in more complex "conversation" gatttool process, take @ expect (1) , chat (8) tool, allow send sequence of strings, , wait responses.
Comments
Post a Comment