Execution method with log based on Shell

An execution method and log technology, applied in the field of Linux Shell script, can solve the problems of not being able to provide a console and being inflexible, and achieve the effect of convenient operation and log tracking

Active Publication Date: 2009-02-18
SHANGHAI WINGTECH ELECTRONICS TECH
View PDF0 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Both of these methods are not flexible enough to provide users with concise and effective console information

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Execution method with log based on Shell
  • Execution method with log based on Shell
  • Execution method with log based on Shell

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The specific implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings and examples, but the protection scope of the present invention should not be limited thereby.

[0031] The present invention is based on the band log execution method of Shell, is applied to Linux and Unix platforms, and the hardware platform that this method implements basis is all hardware platforms that Linux / Unix supports, as x86, AMD, ARM; The basic that these hardware platforms need to include The hardware is CPU, storage device (such as NAND Flash, T-Flash, etc.), keyboard, and display.

[0032] The method comprises the steps of:

[0033] Step 1: put the given output content or command character string in the shell execution script into a variable; the given output content is text information to be output, and store it in the variable MSG. The given content to be output is the command to be executed, which is stored...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

Disclosed is a Shell-based log execution method, the method includes the following steps: step one: the given output content in the Shell execution script or command strings are put in one variable; step two: according to different parameters, the content of the variable is selected whether to be exported to the console or to be displayed on the display; if common strings are stored in the variable, then switch to step three; if command strings are stored in the variable, then switch to step four; step three: the common strings processing module processes the common strings; step four: the command strings processing module executes the command strings and processes the output of the command executing. Based on the invention, the execution and log tracking of the large-scale script program are realized conveniently, moreover, reasonable and effective user prompt are given on the console.

Description

technical field [0001] The invention relates to a Linux shell script, in particular to a shell-based execution method with logs. Background technique [0002] Shell is widely used in Linux / Unix operating systems, and is often used to complete specific tasks in batches. It has the advantages of simple writing, good scalability and flexibility. In the commonly used Shell script execution methods now, the operation of the script and its output control are relatively simple, or the output of the script can only be written into the console, or can only be written into the log file. [0003] If all the output of the script is sent to the console, it will be difficult for the user to find the information they need in a variety of information, and if all the output is sent to the log file, the user has to find the running information of the program in the log file. These two methods are not flexible enough to provide users with concise and effective console information. Contents ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 谢伟
Owner SHANGHAI WINGTECH ELECTRONICS TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products