Tag: Request an ipad address not with two use data std nal[Email protected] shell]# vi backup.sh #!/bin/sh ipaddress=172.17.167.38 ssh-tt [email protected]$ Ipaddress-p Note: If SSH does not add the TT parameter (indicating that no TTY is
I. Three ways to take random numbers and encrypt them1.random of Fetch and encryptionThe method of taking the number:650) this.width=650; "src=" Https://s3.51cto.com/oss/201711/14/dba3bd986bd100e199cecf8a1067e559.png "title=" Screenshot from 2017-11-
Start, close HBase./bin/start-hbase.sh./bin/stop-hbase.shQuery the HBase version. Its syntax is as follows:HBase (main):010:0> versionBuild tableCreate ' ', ' 'Create ' emp ', ' personal data ', ' professional data 'List all tables: ListTable
Recently learning shell programming, a little bit of gadgets to automate the collection of AWR reports, to facilitate problems in the system when troubleshooting.The contents of the script are as follows, the system collects the AWR report from 20 o'
1 "Judge input as number, character or otherScript code:Test results:2 "Averaging:Test results:3 "self-reducing output:Script code: Test results:4. Add a prefix to the file:Script code:Effect Display:5 "Batch test file is present:Script
If
Single-format and nested
if conditional expression; then #当条件为真时执行以下语句 command list else #为假时执行以下语句 command List fiif Statements can also be nested using an if condition expression 1;then if condition expression
Learning from the previous articles, we learned the basic syntax of the shell. In the actual operation of Linux, we often see the command will have many parameters, such as: Ls-al, and so on, then how this parameter is handled? Let's take a look at
In operation and maintenance work, we should analyze the log of back-Office system frequently, and provide the basic data for the monitoring result by grasping the key word information in the log and counting the fetch results.The following shell
(title): Determine if the incoming parameter is IPIdea: 192.168.1.1is the condition of the IP, * * * dot decimal This four number must be less than 255Dot decimal must be guaranteed to be a number, not a letter#!/bin/bash[ -z $1 ] && echo "uesage :
1./dev/null/dev/zero ①/dev/null:/dev/null, called an empty device, is a special device file that discards everything written to it (but reports a successful write operation) and reads it immediately to get an EOF. In Unix jargon,/dev/null is called
Comm CommandUsage scenarios:Requires a common list of records for two files or a list of records that appear only in the first file but do not appear in the second fileHow to use:Must be sorted first, that is, sortParameters1 shows columns in the
The shell is an interface between the user and the system in a Linux system, and it is a high-level programming language, in addition to being the command interpreter. In the Linux command described earlier, the shell appears as a command
Tag: will return CTR Word delete Move page ackMove cursor
ctrl+b: Move forward one character (backward)
ctrl+f: Move back one character (forward)
alt+b: Move forward one word
alt+f: Move back one word
ctrl+a: Move to the
Shell script is a "program" written using the shell's function, which uses plain text files to write some shell syntax and instructions (including external instructions), with regular expressions, pipeline commands, and data flow redirection. In
#!/bin/bash#author: The Adventures of Tintin (Jacob) #定义数组, save all the possibilities of Punch game= (stone scissors cloth) num=$[random%3]computer=${game[$num]}# Get the punch of a computer by random number # The possibility of a punch is
Shell scripts become used in the process usually requires process control, in general, sequential execution, in the actual use of different situations need to execute different commands, then use the choice to execute such as if, case, sometimes
Knowledge Points:
Array
function Local Variables
Defining pass-through parameters
Example 1:A= (1 2 3) b= (a B c) function () {Local a=$1 local b=$2 for I in $a does echo $i done Ech o $b}funcition "${a[*]}" "${b[*]}" Result: 12
1. Array definition[[email protected] ~]# a= (12345678) [ [Email protected] -IDC ~]# Echo $aA pair of parentheses indicates an array, and the elements of the array are separated by a "space" symbol.2. Array reading and Assignment1) Get the length
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