Requirement-driven Linux Shell Programming
Requirement-driven Linux Shell programmingtable of Contents
1. Where can I find the basic Material about Linux Shell programming?
2. How to time a function/program (Get the execution time of a
Script monitoring:The process that gets the maximum number of handles:Link Analysis:Script fragment:Case"$handle" inch2) echo"The handle of the process:"Echo" "Handle| Awk'{print $ "\ n" \ n "\ $7" \ n " $9" \ n "$11" \ n "}'>Temp forIinch' Cat temp
Software shelling can compress the volume to prevent resource modification and increase the difficulty of cracking. We need to debug a software. Generally, the non-compressed Shell needs to be removed first.
Program Debugging is supported. Common
There are three common file descriptors in shell programming:0: stdin, standard input. The default value is the keyboard input.1: stdout, standard output. The default value is screen output.2: stderr, standard error output. The default value is
The structure features of all return texts are as follows:
If the number of characters is an even number, it is structured as: A Character Sequence is connected to another character sequence with the same but the opposite order.
If the number of
20. Use the shell command in the pipeline to obtain system running data:
1. output the five commands that occupy the most memory in the current system:#1) run the ps command to list all processes running on the current host.#2) The fifth field is
Shell Structures are divided into three categories: sequential structure, branch structure, and cyclic structure.
1. If statement
Syntax format:
IfThenFi
If the return value of the last command in statement sequence a is 0, execute the command
[This is Android embedded learning series I]
Although I have been using Linux for more than a year, I do not know many principles. Now, let's take notes on learning Android embedded courses with sundy.
Shell is actually an interface for user
Shell text filtering (awk) classification: Linux Shell script learning 1241 people read comments (0) Add to favorites report shell Regular Expression script task Language
If you want to format packets or extract data packets from a large text file,
When running commands in Linux Shell, each process is associated with three open files and uses file descriptors to reference these files. Because the file descriptor is not easy to remember, shell also provides the corresponding file name.
Standard
Requirement: create 10 SYSTEM account oldboy01-oldboy10 in batches and set to generate password (different password ).
Implementation script:
#!/bin/bash#Question3for i in $(seq -w 10)do useradd -s /bin/bash oldboy$i echo "password$i"
Note: The subscript of the array in shell starts from 0 by default.
1. Place the string in an array to obtain its length.
Copy codeThe Code is as follows :#! /Bin/bash
Str = "a B -- n d"
Array = ($ str)
Length =$ {# array [@]}
Echo $ length
For (I
The following are Shell Study Notes for 1-2 days:
--------- I am a separator ---------
Hardware is executed, and operations are performed between the kernel and hardware.
Command parser.
Shell script Components
System commands
Text processing
Both $ * and $ @ provide quick access to all parameters, both of which can store all command line parameters in a single variable.
$ * The variable saves all the parameters provided on the command line as a single word and is treated as a single
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