Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- coproc bluetoothctl
- echo -e 'scan on\n' >&${COPROC[1]}
- sleep 3
- echo -e 'remove AA:AA:AA:AA:AA:AA\n' >&${COPROC[1]}
- sleep 1
- echo -e 'pair AA:AA:AA:AA:AA:AA\n' >&${COPROC[1]}
- sleep 1
- echo -e 'connect AA:AA:AA:AA:AA:AA\n' >&${COPROC[1]}
- sleep 1
- echo -e 'scan off\n' >&${COPROC[1]}
- echo -e 'exit\n' >&${COPROC[1]}
- output=$(cat <&${COPROC[0]})
- echo $output
Add Comment
Please, Sign In to add comment