Follow the Mongdb authoritative guide when using version 3.4. 1 version of MongoDB, which uses the Batchinsert function to BULK Insert the students collection Db.students.batchInsert ([{"ClassID": 1, "age": +, "name": "Kobe"}, {"ClassID": 1, "Age":
in a variety of Internet + digital era, Linux operations have become increasingly automated direction, more and more operators run in the automated operation of the road. The most popular operational automation languages currently under Linux are
Shell script +expect deploying SSH in bulkFirst, the preparation of work and ideas1, three machines to do experiments (centos6.5, ip:192.168.0.22 (master control), 192.168.0.156, 192.168.0.157)2,ip:22 this one control machine, the other 2 do the
This article: Determine whether the user input parameter is a numberHow is the calculation done in the shell?
Way One
[[email protected] scripts]# echo $((1+2)) 3
Way Two
Note: When using the method two, the requirements
Executes the command and uses the command state return value to determine certain statesecho $?0 stands for Success, not 0 for unsuccessfulTo test an expressionNumerical comparison-eq equalsThe return value is 1, indicating 2 is not equal to 3-ne
Overview of the use of parentheses in the Linux shell 本文主要介绍Linux中括号的用法,主要包含判断文件和变量。**注意事项**:中括号两边必须有空格。The knowledge involved in using brackets &&, | | | 在本文对文件或者变量做判断的时候,可能会多次使用到&&和||这两个符号,所以在我们进入中括号的学习之前首先了解一下这两个符号的作用。 &&:
1. string Judgments
STR1 = str2
True when two strings have the same content, length
Str1! = str2
True when strings str1 and str2 are unequal
-N str1
True when the length of a string is
#/bin/bash# definition of Nginx Source package version, the script will check whether the file is in the current directory according to the version name and suffix if you need to install different versions of Nginx can modify these two variables
1. Batch Add UsersCreate a TXT file for the user name and password combination userdata.txt, as follows:123123 123 123 123 123The script to add the above users in bulk is:#! /bin/Bash whileRead Line Dousername=$(Echo$line |Cut-f1-d' ') #或 username=
A wildcard character? Unit # blocked command \ Screen symbol| Pipe character $ use variable ~ Home directory & put behind
>> 2> 2>>Error redirection[] Array
Cut segmentCut-d:-f 3, 4 charactersFiles under three and four columns-C Line-F
Some bits and pieces of basics I. Understanding shell scriptsa) Related conceptsThe shell is a command interpreter that executes the commands and programs that the user enters in order (the command that encounters the sub-script, which executes the
To view the commands for the terminal tool:echo $TERMThe returned results are as follows:xterm-256color
To view the command for the shell environment:echo $SHELLThe returned results are as follows:/bin/bash
Switch the shell environment: chsh
Shell Preparation1. Identify the shell typeEchoEcho $BASHEcho $SHELLThe top three command results are:/bin/bash2, Terminal common operationA, delete a single character c+h or BACKSPACE keyB. Delete single word c+wC, delete a single row c+ud, repeat
$ default variable in 1.shell
$n $ $ for the first argument, and $ for the second argument ...
$# Number of command-line arguments
the name of the current program
$? The return code of the previous command or
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