Is there any way to create a script that runs in the background of unix that listens for a user to type in command, then runs a task? I hope that makes sense, thanks!
Edit: I want to run a shell script that listens for a user to type in a shutdown command, when a shutdown command is typed in, the script will run a function (of sorts) that will write out to a file some system information so I can capture some info at the time of ever shutdown.
Aucun commentaire:
Enregistrer un commentaire