Baidu Linux-Linux general technology-Linux programming and kernel information. The following is a detailed description. 1. Extract the rows that contain "WARNING" or "FATAL" and do not contain "IGNOR" from the. log file, and then extract the 5th fields separated ":".
2. Write a script and only want to perform simple subtraction. A prompt is required to enter the variable.
3. Read the Shell script (explain the functions executed below). Pick out the errors in the following program or script and describe the errors.
#! /Bin/bash
# Monitor whether the point Port of cpuser is normal
Printf "the result of $ NUM1 minus $ NUM2 is % d \ n" "$ NUM3"
3. Use reverse quotation marks to replace the command line. if [$? = 0] should be written as if [$? = 0], used to determine whether the last command was successfully executed;
The last line should be>/dev/null, And the last line after the fi is removed.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service