Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

typing "end" inside a script to end a process started

Tags:

bash

I have a script where I start it in the script but it needs "end" to be typed to shut down correctly, Is there anyway I can this from inside the script with the PID?

like image 839
Jennifer Conlon Avatar asked Nov 30 '25 12:11

Jennifer Conlon


1 Answers

For this case you can even use a here-string:

$ myscript <<< end

This will make your script read from the given string instead of stdin

like image 123
Chirlo Avatar answered Dec 03 '25 13:12

Chirlo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!