CLI Exit-Call Parameter Handling via Shell Script Mediator
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Command line interfaces (CLI) that restrict the passing of parameters to exit-calls limit the flexibility and effectiveness of script execution, preventing scripts from being executed based on input parameters, which is particularly problematic for tasks like smoke testing newly deployed applications.
Innovation Solution
Generating shell scripts that include parameters and instructions to execute task scripts, allowing the name and path of the shell script to be passed to the exit-call, enabling the execution of task scripts based on desired parameters even when parameters cannot be directly passed to the CLI.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If parameters are restricted in exit-calls to maintain simplicity, then ease of operation is improved, but adaptability and script flexibility deteriorate
Solution Approach 1:
A shell script is introduced as an intermediary between the CLI and the task script. The shell script receives parameters from the CLI and passes them to the task script, enabling parameter transmission without modifying the CLI's exit-call interface. This mediator resolves the contradiction by maintaining CLI simplicity while enabling script flexibility.
Solution Approach 2:
The execution process is segmented into two independent parts: the CLI (which maintains simple parameter-less exit-calls) and the shell script (which handles parameter processing). This segmentation allows each component to maintain its simplicity while the combination provides the needed adaptability.
2Device complexity
If parameter-less exit-calls are used to maintain CLI simplicity, then device complexity is reduced, but functionality and script execution capability deteriorate
Solution Approach 1:
The shell script acts as a mediator that bridges the simple CLI interface and the parameter-rich task execution. It receives the simplified exit-call from the CLI and expands it into a parameterized execution, maintaining CLI simplicity while enabling full functionality.
Solution Approach 2:
The shell script is prepared in advance with the necessary parameter handling logic. When the CLI invokes the exit-call, the shell script is already configured to receive and process parameters, enabling functional enhancement without increasing CLI complexity.
Data Source
AI summary
Disclosed herein are system, method, and computer program product embodiments for enhancing parameter-less exit-calls from a command line interface (CLI). An embodiment operates by obtaining a parameter and a name for a task script, and then generating a shell script including the name of the task script and an instruction to execute the task script based on the parameter. Then, an execution request for a task including an exit-call is sent to the CLI. The execution request includes a name of the shell script for the exit-call. The CLI calls the shell script in response to the exit-call during execution of the task. Further, the task script is executed based on the parameter in response to the CLI calling the shell script.


