Hosts file
Hosts--the static table lookup for host name (host name query for static tables).
The Hosts file is the last file in the Linux system responsible for fast resolution of IP addresses and domain names, saved in ASCII format under
Under Ubuntu I wrote a shell script with bash to grammar (exactly the script on the computer), under Ubuntu, with SH test.sh to run, but there are unexpected results, such as ECHO-E "\ntest\n" to the execution is different, Run directly with the SH
A. Regular Expressions:Metacharacters is a character used to illustrate the meaning of a character expression, in short, a character used to describe a character.The regular expression re (Regular expression) is a string of characters consisting of
Shell script loop for while until and package management "on"Loop executionTo run a code segment repeatedly multiple timesHow many times to run repeatedly:Number of cycles known beforehandNumber of cycles unknown beforehandThere are entry conditions
Bash's arithmetic operations are available in the following ways:
Serial Number
name
Grammar
Example
1
Arithmetic extension
$ (arithmetic type)
r=$ ((2+5*8))
2
Using
The case statement is suitable for applications that require multiple branching. The case Branch statement is formatted as follows: Case $ variable name inMode 1)Command sequence 1;;Mode 2)Command Sequence 2 ;;*)Sequence of commands executed
Enter HBase Shell Console$HBASE _home/bin/hbase ShellIf you have Kerberos authentication, you need to use the appropriate keytab for authentication (using the Kinit command), and then use the HBase shell to enter the certificate successfully. You
Reference: Linux commands, editor and Shell programming, advanced Programming for UNIX environmentsBoth exec and source belong to the Bash internal command (builtins commands), where you can view all the internal command information by entering man
Linux shell String Operations (length, find, replace) detailedThe following two string operations are described in this blog post,1 ${string:p osition} #在 $string, extract substring 2 ${string starting from position $position : Position:length}
String-related operations are often involved in the shell batch process. There are a lot of command statements, such as: awk,sed can do string various operations. In fact, the shell built a series of operating symbols, you can achieve similar
Shell backgroundThe first important shell was the Bourne shell (so named to commemorate the Shell's inventor Steven Bourne), when the first popular Unix version 7 was released in 1979, and began to useBourne Shell. Bourne Shell's main file name is
If ....; Then....Elif ...; Then....Else....FiIn most cases, you can use test commands to test the condition. For example, you can compare strings, determine whether the file exists and whether it is readable, etc... The condition test is usually
1.login & Non-login ShellLinux system bootstrap, the kernel will create the INIT process for a series of system initialization operations. When each user logs in to the shell, the relevant login profile is read regardless of whether it is logged on
one, the Linux shell wildcard character (wildcard)Wildcards are handled by the shell (not by the command statements involved, but we are not aware of these wildcard characters in the shell commands), it will only appear in the "Parameters" of the
1. Unix Shell functions A shell is a program that manages processes and runs programs. All the common shells have 3 main functions: (1) running the program; (2) Managing inputs and outputs (3) Programmable The shell is also a programming language
Before writing an article that uses shell scripts to weigh 10G data, see "Using a few shell commands to quickly weigh 10G data." Today, however, another business, the complexity of the business is more complex than the last simple to be important.
Problem: Switching a user through the su command does not enter the user's shell environment. Why? To solve this problem, we must be clear about the difference between using Login Shell and non-login shell.
Login Shell:Complete logon process is
1. ls: similar to the Dir command in DOS
The most common parameters of LS include-a-l-f.
Ls-
Linux Files. files starting with LS are regarded as hidden files and cannot be seen only by using ls commands. In addition to displaying common
5.2 Bash Variables
The following variables are set or used in Bash. Other shells generally do not process these variables.
Some variables used by Bash are also described in other chapters: for example, for variables used by tools for controlling
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