Catalogue
1. List of special variables
2. Special Instructions
In the shell, variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special meanings, and such
condition Test1. Condition testing: Test [The command test or [can test if a condition is true, if the test result is real, the exit status of the command is 0, if the test result is false,The exit status of the command is 1 (note the exact opposite
Select Loops and menus
It is primarily used to create menus, which are displayed as a list of menu items in the form of a numerically ordered display on the standard error output, and a PS3 prompt is displayed to request user input (by default,
Conditional judgment is the basis for a program to gain intelligence, while the Bourne shell script simulates conditional expressions in most programming languages by command.The control structures supported in the shell are:(1) If then else fi(2)
Lienhua342014-10-15ISO C defines the system function for executing a command string in a program. Its statement is as follows,
#include
int system (const char *cmdstring);
The system function calls the fork, exec, and WAITPID
When you install new software in a terminal environment, you can often see the Information dialog box pop up and need your input. The type of dialog box has a password box, checklist, menu, and so on. They can guide you in an intuitive way to enter
It's time to enter the fourth chapter, just see a post title: I have a good talent, but unfortunately I am a girl. Khan ~ this ... Music Without Borders, this should not have no gender sector?
Fourth Chapter Text Processing tools
The book first
Reference: First, the user log into the system after the system environment variables:
$HOME user's own directory
$PATH directory to search for when executing commands
$TZ Time Zone
$MAILCHECK every few seconds to check for new letters
$PS 1 The
Reference
http://www.khattam.info/2009/08/04/solved-subprocess-pre-removal-script-returned-error-exit-status-2-error/
I had an error installing Ldap-account-manager on Ubuntu,
When sudo aptitude install Ldap-account-manager
The following error
One, parenthesis, parentheses ()1, single parenthesis ()?? ① Command Group. The commands in parentheses will run in a new sub-shell sequence. So the variables in parentheses cannot be used by the rest of the script. Multiple commands in parentheses
ShellSpecial variables: Shell $, $#, $*, [email protected], $?, $$ and command line argumentsAs already mentioned, variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special
One, parenthesis, parentheses ()1, single parenthesis ()① Command Group. The commands in parentheses will be executed in a new sub-shell sequence, so the variables in parentheses cannot be used by the rest of the script. Multiple commands in
Condition testThe command test or [can test whether a condition is true, if the test result is real, the exit status of the command is 0, if the test result is false, the exit status of the command is 1 (note the exact opposite of the logical
One, parenthesis, bracket ()1, single parenthesis ()① Command Group. The commands in parentheses will be executed in a new sub-shell sequence, so the variables in parentheses cannot be used by the rest of the script. Multiple commands in parentheses
One, parenthesis, parentheses ()1, single parenthesis ()① Command group . The commands in parentheses will be executed in a new sub-shell sequence, so the variables in parentheses cannot be used by the rest of the script. Multiple commands in
When writing shell scripts, parentheses, parentheses, and various usages are often used. One, parentheses, parentheses () 1, single parenthesis.①The command group. The commands in parentheses will be executed in a new sub-shell sequence, so the
Strictly speaking, there is no concept of an expression in the shell. The shell itself is simply a collection of commands, and certainly not a bunch of random piles, but a certain organization. But this organization is not so rigorous, so this
Bash Scripts Foundation II
1.Bash Position Parameters
There are two simple ways to read user input into a variable in bash.
-Use Read to prompt the user for input (using the-P option) and store it directly to one or more variables:
Interactive
Directory index of this blog post[TOC]First, the Cognition function (a) What is a function?1, the function, the English called: function2. A function is a block of statements made up of several shell commands(b) Why should I use a function?1.
Author: Jin Liang (golden1314521@gmail.com) csdn blog: blog. csdn. when netu012176591 compiles a dynamic link library, the following error occurs: error: undefinedreferencetoxxx) collect2: ldreturned1exitstatus attribute 1. i'm sure there is no
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.