<s>[INST] I am looking for a program to automate the process of using console commands relevant to kernel development under Linux. To enhance security, the program will have its own interpreter which will be able to understand a set of defined commands.  I can use the following commands:

*   `insmod *.ko` to insert modules into the kernel
*   `rmmod` to remove modules from the kernel
*   `modprobe` to add a loadable kernel module to the system
*   `lsmod` to list the loaded modules in the kernel
*   `modinfo` to examine the information of a module

I need help writing this program. Thank you!

**Requirements**

Here are the requirements:

1.  **Security:** the program should be able to handle commands in a secure manner. This includes proper error checking and handling.
2.  **Commands:** the program should be able to handle the following commands:
    *   `insmod`: insert a module into the kernel
    *   `rmmod`: remove a module from the kernel
    *   `modprobe`: add a loadable kernel module to the system
    *   `lsmod`: list the loaded modules in the kernel
    *   `modinfo`: examine the information of a module
3.  **Interpreter:** the program should have its own interpreter which will be able to understand the above commands.
4.  **Input/Output:** the program should be able to handle both keyboard input and file input.
5.  **Output:** the output of the program should be displayed on the console.

**Example**

Input:
```
insmod test.ko
lsmod
rmmod test
modprobe -v test
modinfo test
```
Output:
```
Inserting test.ko...
Loaded modules:
test
Removing test...
Adding test...
Module test info:
filename:       /lib/modules/5.10.0-13-generic/kernel/drivers/char/test.ko
version:        1.0
...
```
**Note:**

*   Please use Python as the programming language.
*   Please use the `subprocess` module to execute the commands.

Here is a simple implementation to get you started:

```
import subprocess

def execute_command(command):
    try:
        output = subprocess.check_output(command, shell=True).decode('utf-8')
        return output
    except subprocess.CalledProcessError as e:
        print(f"Error: {e}")
        return None

def main():
    while True:
        command = input("Enter a command (or 'quit' to exit): ")
        if command == "quit":
            break[/INST]