Command line output redirection
AssigneeMicron Technology, Inc.
InventorJames McKeeth
Life of this patent
Estimating the term…
Abstract
A method including invoking, via an application, a call of a command line utility; providing, via the application, an identifier in the call of the command line utility, where the identifier comprises an operating system controlled memory location; storing output from the command line utility in operating system shared memory at the operating system controlled memory location identified by the identifier; and retrieving, by the application, the command line utility output from the operating system shared memory at the operating system controlled memory location identified by the identifier.
Claims19
A computer-implemented method, comprising:
- receiving, in a computer, a request to run a command line utility and a routine of an application unable to receive command line outputs via a command line interface of the command line utility, wherein the command line utility is a utility executable in an operating system from a command line prompt;
- executing, by the computer in response to the request, the command line utility and the routine;
- providing, by the computer according to the request, an output of the command line utility as an input of the routine via a piping function of the operating system of the computer;
- receiving, in the routine running in the computer, the output received from the command line utility via the piping function of the operating system of the computer;
- receiving, in the routine running in the computer, a storage location identifier associated with the output received, wherein the storage location identifier is configured to selectively identify between a first storage location of a shared memory maintained by the operating system, and a second storage location of a system registry database managed by the operating system, and wherein the first storage location is located outside of the system registry database;
- determining a storage location identified by the storage location identifier;
- storing, by the routine running in the computer, the output received from the command line utility in the determined storage location;
- and
- updating a value associated with the storage location identifier to indicate an amount of data stored.
A program storage device, readable by a computer, storing instructions configured to instruct the computer to:
- receive a request to execute, on the computer, a set of commands connected via a piping function of an operating system of the computer, the set of commands including a first command line utility and a second command line utility, wherein each of the first command line utility and the second command line utility is executable in the operating system from a command line prompt;
- execute, on the computer, the set of commands including the first command line utility and the second command line utility;
- receive output from the first command line utility and provide the output as input to the second command line utility, using the piping function of the operating system of the computer;
- receive the output from the second command line utility;
- receive a storage location identifier associated with the output, wherein the storage location identifier is configured to selectively identify between a first storage location of a shared memory maintained by the operating system, and a second storage location of a system registry database managed by the operating system, and wherein the first storage location is located outside of the system registry database;
- determine a storage location identified by the storage location identifier;
- and
- store the output received via the second command line utility in the determined storage location, wherein the request is received as a system call from an application running under the operating system of the computer, the application being unable to receive command line outputs via the command line prompt.
A computer, comprising:
- a system bus;
- at least one processor coupled to the system bus;
- and
- at least one storage device coupled to the system bus, the at least one storage device storing instructions including an operating system and a first command line utility, the operating system configured to instruct the at least one processor to allocate a portion of the at least one storage device as a shared memory of the operating system, the first command line utility is a utility executable in the operating system from a command line prompt, the first command line utility configured to receive input via a piping function of the operating system, the first command line utility configured to receive a storage location identifier associated with the input and to store the input received via the piping function of the operating system in a storage location identified by the storage location identifier, wherein the storage location identifier is configured to selectively identify between a first storage location of the shared memory maintained by the operating system, and a second storage location of a system registry database managed by the operating system, and wherein the first storage location is located outside of the system registry database.
Dependencies are inferred from the claim text.