add generic linux command tool

This commit is contained in:
Mery-Sanz 2025-01-10 16:08:41 +00:00
parent 45dcabeb13
commit d92d8519ef
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
"""
This is used to create a generic linux command.
"""
from cai.tools.common import run_command # pylint: disable=import-error
def generic_linux_command(command: str = "", args: str = "", ctf=None) -> str:
"""
A simple tool to do a linux command.
Args:
command: The name of the command
args: Additional arguments to pass to the command
Returns:
str: The output of running the linux command
"""
command = f'{command} {args}'
return run_command(command, ctf=ctf)