Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
342 views
in Technique[技术] by (71.8m points)

linux - Killing/Terminating another terminal from a bash script

I am trying to write a bash script that waits for a keypress/input to open a new terminal and runs an infinitely looped process, and then again waits for another keypress/input to kill that process and then close that new terminal. This is my very first bash script and I'm not very familiar with how most things work in this area. I would appreciate any kind of help. I'm opening the new terminal and running the process like this:

gnome-terminal -- roslaunch realsense2_camera opensource_tracking.launch

My main problem is how to kill this process within my bash script and then closing the newly created terminal. I would also appreciate any help with the keypress/input stuff.

question from:https://stackoverflow.com/questions/65877986/killing-terminating-another-terminal-from-a-bash-script

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...