IP Library › Granted Patent US 12,619,445
Granted Patent B2
US 12,619,445 · App. 18/416,860 · Granted May 5, 2026

Command line script automation by monitoring execution of completed tasks

Inventors: Raymund Lin (Taipei, TW); Nan Chen (Beijing, CN); Ju Ling Liu (Beijing, CN); Ye Chuan Wang (Beijing, CN); Li Na Wang (Beijing, CN)
Assignee: International Business Machines Corporation
G06F9/44505G06F9/543
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,619,445
App. No.
18/416,860
Filed
Jan 18, 2024
Granted
May 5, 2026
Kind
B2
Art Unit
2184
USPC
713/2
Abstract

Computer implemented methods, systems, and computer program products include program code executing on a processor(s) that monitors execution of a script to complete a task via a command line interface, and based on completing the task, generates, based on the script, a non-directional representation of the script and a directional representation of the script. The processor(s) clusters the non-directional representation of the script with non-directional representations of similar scripts (successfully in advance of the monitoring). The processor(s) merges the directional representation of the script to a cluster comprising the non-directional representation of the script.

Claims (58)

1 . A computer-implemented method of assisting command line script entry, the method comprising:

monitoring, by one or more processors, execution of a script to complete a task via a command line interface;

based on the task being complete, generating, by the one or more processors, based on the script, a non-directional representation of the script and a directional representation of the script, wherein the directional representation of the script comprises complete execution paths;

clustering, by the one or more processors, the non-directional representation of the script with non-directional representations of similar scripts, wherein the similar scripts were executed successfully in advance of the monitoring; and

merging, by the one or more processors, the directional representation of the script to a cluster comprising the non-directional representation of the script.

2 . The computer-implemented method of claim 1 , wherein the non-directional representation of the script comprises a first graph wherein each node in the first graph comprises a command and a target in the script.

3 . The computer-implemented method of claim 2 , wherein first graph represents how frequently the command and the target are executed together.

4 . The computer-implemented method of claim 1 , wherein the directional representation of the script comprises a second graph wherein each node in the second graph comprises a command, a target, and a parameter in the script.

5 . The computer-implemented method of claim 1 , further comprising:

determining, by the one or more processors, commencement of entry of a new script to accomplish a new task via the command line interface;

progressively obtaining, by the one or more processors, text comprising portions of the new script, via the command line interface; and

based on the obtaining, comparing, by the one or more processors, a portion of the new script to the directional representation of the script based on identifying at least one similar path between the new script and the directional representation of the script.

6 . The computer-implemented method of claim 5 , further comprising:

based on the comparing, identifying, by the one or more processors, the at least one similar path; and

utilizing, by the one or more processors, the at least one similar path, to suggest, via a user interface, a next text input to enter via the command line interface.

7 . The computer-implemented method of claim 6 , further comprising:

utilizing, by the one or more processors, each node in the at least one similar path to continue suggesting sequential text inputs via the user interface; and

determining, by the one or more processors, that the new task is complete.

8 . The computer-implemented method of claim 7 , further comprising:

publishing, by the one or more processors, text entries in the command line interface from the commencement of the entry to the determining the task is complete as a second script;

generating, by the one or more processors, based on the second script, a non-directional representation of the second script and a directional representation of the second script;

clustering, by the one or more processors, utilizing a machine learning algorithm, the non-directional representation of the second script with non-directional representations of scripts similar to the second script, wherein the scripts similar to the second script were executed successfully in advance of the publishing; and

merging, by the one or more processors, the directional representation of the second script to a second cluster comprising the non-directional representation of the script.

9 . The computer-implemented method of claim 5 , wherein the task and the new task are selected from the group consisting of: installing a given software package and configuring the given software package.

10 . The computer-implemented method of claim 5 , further comprising:

based on the comparing, not identifying, by the one or more processors, the at least one similar path;

monitoring, by the one or more processors, execution of the new script;

determining, by the one or more processors, that the new task has been completed successfully;

generating, by the one or more processors, based on the new script, a non-directional representation of the new script and a directional representation of the new script; and

generating, by the one or more processors, a new cluster based on the non-directional representation of the new script and the directional representation of the new script.

11 . The computer-implemented method of claim 1 , wherein a script exchange portal client performs the monitoring.

12 . The computer-implemented method of claim 5 , wherein the at least one similar path comprises at least three common nodes between the portion of the new script and the directional representation of the script.

13 . The computer-implemented method of claim 1 , further comprising:

prior to generating the non-directional representation of the script and the directional representation of the script, sanitizing, by the one or more processors, the script.

14 . The computer-implemented method of claim 8 , wherein publishing the second script comprises publishing the second script to a script exchange portal server.

15 . The computer-implemented method of claim 1 , wherein clustering the non-directional representation of the script with the non-directional representations of the similar scripts comprises:

determining, by the one or more processors, the script is similar to the non-directional representations of the similar scripts, wherein the determining comprises:

calculating, by the one or more processors, a distance between each node of the script in the non-directional representations and each node in one or more non-directional representations of other scripts; and

identifying, by the one or more processors, the non-directional representations of the similar scripts from the one or more non-directional representations of the other scripts based on the distance being within a pre-determined threshold.

16 . The computer-implemented method of claim 15 , wherein the distance comprises a text distance.

17 . The computer-implemented method of claim 4 , wherein the clustering comprises applying a machine learning algorithm, the method further comprising:

training, by the one or more processors, the machine learning algorithm utilizing the similar scripts as training data.

18 . The computer-implemented method of claim 1 , further comprising:

determining, by the one or more processors, that the task has been completed successfully.

19 . A computer system for assisting command line script entry, the computer system comprising:

a memory; and

one or more processors in communication with the memory, wherein the computer system is configured to perform a method, said method comprising:

monitoring, by the one or more processors, execution of a script to complete a task via a command line interface;

based on the task being complete, generating, by the one or more processors, based on the script, a non-directional representation of the script and a directional representation of the script, wherein the directional representation of the script comprises complete execution paths;

clustering, by the one or more processors, utilizing a machine learning algorithm, the non-directional representation of the script with non-directional representations of similar scripts, wherein the similar scripts were executed successfully in advance of the monitoring; and

merging, by the one or more processors, the directional representation of the script to a cluster comprising the non-directional representation of the script.

20 . A computer program product for assisting command line script entry, the computer program product comprising:

one or more computer readable storage media and program instructions collectively stored on the one or more computer readable storage media readable by at least one processing circuit to:

monitor execution of a script to complete a task via a command line interface;

based on the task being complete, determine that the task has been completed successfully;

generate, based on the script, a non-directional representation of the script and a directional representation of the script, wherein the directional representation of the script comprises complete execution paths;

cluster, utilizing a machine learning algorithm, the non-directional representation of the script with non-directional representations of similar scripts, wherein the similar scripts were executed successfully in advance of the monitoring; and

merge the directional representation of the script to a cluster comprising the non-directional representation of the script.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE CONVEYING PARTY NAMES PREVIOUSLY RECORDED AT REEL: 066173 FRAME: 0547. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT . Recorded Jan 23, 2024
From: LIN, RAYMUND; CHEN, NAN; LIU, JU LING; WANG, YE CHUAN; WANG, LI NA
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 066363/0354 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 18, 2024
From: LIN, RAYMUND; CHEN, NAN; LU, JU LING; WANG, YE CHUAN; WANG, LI NA
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 066173/0547 →
Continuity (1)
Related Publication 20250238242A1 · Jul 24, 2025
References Cited (18)
US 8078971B2 · Ghattu · 2011 [cited by examiner]
US 8660849B2 · Gruber et al. · 2014 [cited by applicant]
US 9123336B1 · Uszkoreit et al. · 2015 [cited by applicant]
US 10761824B2 · Asare et al. · 2020 [cited by applicant]
US 11120299B2 · Haigh et al. · 2021 [cited by applicant]
US 11860725B2 · O'Toole · 2024 [cited by examiner]
US 12008473B2 · Lazaridou · 2024 [cited by examiner]
US 20110196853A1 · Bigham et al. · 2011 [cited by applicant]
US 20150355609A1 · Warren · 2015 [cited by applicant]
US 20220091923A1 · O'Toole et al. · 2022 [cited by applicant]
US 20220309243A1 · Sivashanmugam et al. · 2022 [cited by applicant]
US 20230073052A1 · Mohylevskyy et al. · 2023 [cited by applicant]
CA 2964349C · 2023 [cited by applicant]
KR 102537767B1 · 2023 [cited by applicant]
“A Smart Interactive Command Prompt Method” Authors Disclosed Anonymously. Nov. 3, 2019. 3 pages. [cited by applicant]
“A System and Method to Automated General Help Guide for Command Line Error” Authors disclosed Anonymously. Oct. 8, 2012. 9 pages. [cited by applicant]
“Automatic Command History Recording and Filtering for System/Application Failure Prevention” Authors Disclosed Anonymously. Sep. 22, 2010. 5 pages. [cited by applicant]
“Smart Command Line Contextualization Mechanism” Authors Disclosed Anonymously. Jan. 22, 2020. 5 pages. [cited by applicant]