-1

i need to do a sequence of commands:

user@user:~$ bluetoothctl 

and than inside that program this command

[bluetooth]# connect

Is it possible to do in one command in terminal? something like that:

:~$ bluetoothctl || connect 

or maybe

:~$ bluetoothctl `connect`

or

:~$ bluetoothctl  --> connect 
  • Did you check if you can do what you want out of the box? `bluetoothctl --help`? Otherwise you can do `echo 'help' | bluetoothctl` – Mikael Kjær Jun 04 '22 at 19:03
  • Possible duplicate of https://stackoverflow.com/questions/14392525/passing-arguments-to-an-interactive-program-non-interactively – tripleee Jun 04 '22 at 19:36

0 Answers0