What I want to do: Whenever the apt-get install
command is run and terminates, run another command immediately without any involvement on the user's part. In my case I want to run a script, but since I can substitute a command for that, a command would be preferable as an example.
By the way, I don't want to run a script that executes two commands, since it must then be manually executed, which is not what I want. The termination of the apt-get install
command must prompt the execution of another command.
NOTE: This may seem like a duplicate of this question, and while I do have an answer, I want to make my intention clear in case there are any other possible solutions, while also clarifying my requirements to other potential viewers to this question.
Edit:
To clarify: I am trying to get one command that runs two!
Why? I want to generate a file containing a list of all the installed dependencies and software on my distro, which is updated every time the apt-get install
command is used.