通过sh命令打开多个终端并执行指定的命令

shell

#!/bin/sh
sleep 1s
gnome-terminal -t "5000" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/web;/usr/bin/python3 app.py;"
sleep 1s
gnome-terminal -t "5001" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/yolo;/usr/bin/python3 detect.py;"
sleep 1s
gnome-terminal -t "5002" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/deepsort;/usr/bin/python3 demo.py;"
sleep 1s
gnome-terminal -t "5003" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/PP-TinyPose/python;/usr/bin/python3 det_keypoint_unite_infer.py;"
sleep 1s
gnome-terminal -t "5004" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/UNet;/home/nvidia/miniforge3/envs/unet/bin/python u_net.py;"
sleep 1s
gnome-terminal -t "5005" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/mediapipe;/home/nvidia/miniforge3/envs/mediapipe/bin/python hand.py;"
sleep 1s
gnome-terminal -t "5006" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/age_and_sex;/usr/bin/python3 run.py;"
sleep 1s
gnome-terminal -t "5007" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/license_plate_recognition;/home/nvidia/miniforge3/envs/torch/bin/python detect.py;"
posted @ 2023-03-16 13:27  bitterteaer  阅读(226)  评论(0编辑  收藏  举报