#!/bin/bash# Create a link interface named Bond0 ip=$1gate=192.168.18.1eth1=eno1eth2=eno2#eth3=eno3#eth4=eno4modprobe bonding# Back up the NIC 1 file cp /etc/sysconfig/network-scripts/ifcfg-$ETH 1 ifcfg-$ETH 1.bak# Modify the NIC Profile
Two virtual machines, all to be detected1. is yum available2. Firewall default zone modified to trusted3. Whether the IP address is configured#######################################################Second, ordinary users (must restore the environment)
Pipe symbol, UNIX is a very powerful feature, the symbol is a vertical line: "|".Usage: Command 1 | Command 2 His function is to pass the result of the first command 1 execution as input of the Command2 to command 2, for example: $ls-S|SORT-NR (Note
Using Prompt_command to implement the command audit function:Record what users, at what time, what to do, and then record the information found in a file.Specific operation:Append the following to/etc/profile:############ #日志审计chmod +s/usr/bin/chmod
The PS command in Linux is the abbreviation for process status. The PS command is used to list those processes that are currently running on the system. The PS command lists the current snapshots of those processes, which are those that are
SET-E # Exit The script if an error happensScript ASet +e # don ' t bail out of bash script if CCache doesn ' t existScript BSET-E # Back to regular ' bail out on error ' modeScript CAs a script shell above,The script in a and C executes when the
Equipped with the Spark cluster, first wrote two small examples with Pyspark, but found that the TAB key is not prompted, so the intention to go to Scala to try, in the Spark-shell under the hint, but found not to backspace, and the hint is not a
1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:1 cat ~/2# BASHRC34# User specific aliases and
Shell Basic OperatorsThe Shell, like other programming languages, supports a variety of operators, including:
Relational operators
Boolean operator
String operators
File Test Operators
Native bash does not support simple
Learning two months of Linux, remember a lot of commands, know the role of the script, also by the script killed about half of the brain cells, and now the script is not skilled use, feel lost. Love my brain cells, hate the script, but have to say
Cat ${file} | While Read lineDoecho $ LineDone-------------------------------------------While the read line #每次读取aa a row in the. ListDoEcho $LINE #输出每行的信息Done ${file}-------------------------------------------Reads the first and second columns
Regular expressions^ Start tag$ end Tag[A-z][A-z][0-9]. Single arbitrary character* Number of previous character repetitions >=0+ Number of previous character repetitions >=1? Number of previous character repetitions 0 or 1{N,m} The number of times
1. Thread group settings, HTTP cookies, HTTP request default settings, Note: Cookies are primarily delivered to the login status2. Set the login HTTP request3. After logging in, access the Data interface (and post-processing the data return value)4.
This article directory:1.1-Bar expressionUsage notes for 1.2 test and []1.3 [[]]1.4 Usage RecommendationsTest can be used for testing expressions, including: string comparisons, arithmetic comparisons, file existence, attributes, types, and so on.
Handling strings in shell scripts1, ${#变量名}Function: Returns the length of a string# foo= "This is a test"# echo ${#foo}//Returns the length of the string foo142. ${variable name: offset:length}Function: Intercepts the string, length specifies the
Sometimes in the Linux operating system need to calculate the length of a string, through the query data to collate the current shell to get the length of the string of several methods, here to share, the method is as follows:Method 1: Use the wc-l
Array Summary
Directory:
Array composition
Array Assignment
Array output
Array case
1. Array compositionThe composition of an array is a collection of elements, using a variable to store multiple elements, to
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