The line end flags for Linux and Windows text files are different. In Linux, the text file uses "/n" for carriage return, while Windows uses "/r/n" to indicate carriage return line breaks. Sometimes you need to be aware of this when writing shell
First,shell variables1. There can be no space between the variable name and the assignment symbol.2. The first character must be a letter a~z or a~z.3. Using a defined variable, add ' $ ' before the variable name, such as:Myname= "Firefly"Echo
When using Biber I usually follow the order of Pdflatex→biber→pdflatex→pdflatex, which are not an available option of Many IDEs.#! /bin/bash# # author:luglio# Date: -/ A/ -# Version:0.1.1# # prerequisites# LaTeX suite with Biber, sam2p# settings#
Example: nohup/mnt/nand3/h2000g >/dev/null 2>&1 &for & 1 More accurate should be the file descriptor 1, and 1 is generally representative of Stdout_fileno, in fact, this operation is a dup2 (2) call. He standard output to All_result, and then copy
Shell1) is a scripting language used on the Linux operating system, providing interfaces for user interaction with the system, similar to the command prompt in Windows, but more powerful;2) can be executed by the command line, or it can be edited as
Bash variables are non-typed------------------------Unlike other programming languages, Bash does not differentiate between variables"type"In essence, bash variables are strings. But depending on the context, bash also allows comparison operations
#!/bin/bash# Linux Shell multifile content replace withsed# Disclaimer: # The source code is mainly the use of two (Chinese and English) with the same key-value pairs of JSON data, the HTML in the Chinese language # Automatic text substitution code.
Shell internal commands and external commandsInternal command: is actually part of the shell program, which is a command executed by the shell itself, usually loaded and resides inside the system when the Linux system loads and runs. External
The part of judgment and inspection can be set or not executed checknginxroot to avoid being subject to permission problems#!/bin/bash#by LCip= ' Ifconfig eth0|awk-f ' [:]+ ' Nr==2{print $4} 'Curl= ' curl-i $IP |egrep "403|200|404" |head-1|wc-l
I. Arithmetic of integers(1) Use Let expression, no need to add ' $ ' before variableLet sum=num1+num2(2) $[ expression ], before the variable can be added $, or not add $SUM=$[NUM1 + num2] sum2=$[$num 1-5] Sum3=$[num1 + 3](3) $ ( expression ),
Special Symbols: *Description: Wildcard character, multiple characters. All files with the suffix ". txt" are listed to[[email protected] 111]# ls *.txt11.txt 1.txt 22.txt 2.txt 33.txt 3.txtSpecial symbols:?Description: Wildcard characters, one
Shuffle question: Wash a pair of poker, what good way? Can be washed evenly, and can wash fast? How efficient is the order of chaos relative to a file? On the shuffle problem, there has been a good shell solution, here another three based on the
Three days of writing edge test, and finally completed the current longest code script, a total of 253 lines, in 2 machine installation Lamp,lnmp have passed smoothly, the script can be used as a production environment.Where the script needs
Welcome to: Ruchunli's work notes, learning is a faith that allows time to test the strength of persistence.
Kafka The main shell scripts are[[Email protected] kafka0.8.2.1]$ ll Total 80-rwxr-xr-x 1 hadoop hadoop
How scripts are executedFor example, we wrote a script under/root/, named Hello.sh. So how does the call execute it? There are two ways to do this:(1) Directly through bash, as follows:Bash hello.shNote: Execute scripts with bash and do not need to
Experiment (I.)Experimental purpose: Detect system once per minute "The root partition has less than 10G of free space to send warning messages to all terminals. "Experimental requirements: Write a script and automate the script.Experimental
CTRL + C Terminal Break programCtrl+d keyboard input end or exit terminalCtrl+s Tentative Current program, pause and press any key to resume operationCTRL + Z put the current program in the background to run, restore to the foreground for command
Existing file1, file2, file3 three files, the contents are as follows$cat File1f1_1f1_2f1_3$cat File2f2_1f2_2f2_3$cat File3f3_1f3_2f3_3Write a shell script to read these three files line by row#!/bin/bashcat file1 file2 file3 |while read P do echo
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