eibersji
eibersji

Reputation: 1216

How can I execute both commands in an sh file?

I have created an sh file:

#!/bin/bash
sudo python3 /home/pi/Desktop/try.py
sudo matchbox-keyboard

and when I execute the file, the program: try.py runs but the matchbox keyboard does not appear. Only when I close the program will the matchbox keyboard will appear. I want them to both appear at the same time.

Upvotes: 0

Views: 31

Answers (1)

Max
Max

Reputation: 126

The script executes both commands sequentially and waits each time until the command returns.

You could change it to:

#!/bin/bash
sudo python3 /home/pi/Desktop/try.py &
sudo matchbox-keyboard

Upvotes: 2

Related Questions