#!/usr/bin# Setting up a database connection conn='Mysql-hhost-pport-uusername-ppassword'#获取最新的binlog文件logfile=$ ($conn-E"Show Master Logs"|Tail-N1|awk-F" " '{print $}') #设置a为1, the user's bottom of the judgment a=1#while循环 while true
1. What is a shell?The shell is the user interface of the system and provides an interface for users to interoperate with the kernel. It receives the command entered by the user and feeds it into the kernel to execute.In fact, the shell is a command
I. Special documents : /dev/null and/dev/ttyThe Linux system provides two special files that are very useful for Shell programming,/dev/null and/dev/tty. Where/dev/null will lose all the data written to it, in other words, when the program writes
This script can do a timed detection, beyond the set value, that is, to send a warning to the mailboxThe script uses the bc,sendmail,163 mailbox,Yum Install BC#!/bin/bash#system monitoring Scriptwhile [1]do# the machine needs to open postfix or
VII. non-direct reference variables:
Three methods of assigning values to standard (direct) variables are provided in shell:1. assign values directly.2. Store the output of a command.3. Store the results of a certain type of computing.However, all
1. Introduction to hadoop File System Permissions
2. Command Introduction
3. References
. Introduction to hadoop File System Permissions
The File Permission model implemented by the hadoop file system is very similar to the
Suppose we define a variable:File =/dir1/dir2/dir3/my.file.txt
You can replace $ {} with different values:$ {File # */}: Delete the first/and its left string: dir1/dir2/dir3/my.file.txt$ {File ### */}: Delete the last/and its left string:
1. Change the password
Use the passwd command to change the password.
If the command is executed under the root user, the password of the root user is modified.2. Get help
Use the LS -- Help Command to obtain help.
1 [[email protected] ~] $ Ls --
Primary
Meaning
[- File]
True ifFileExists.
[-B File]
True ifFileExists and is a block-special file.
[-C File]
True ifFileExists and is a character-special file.
[-D File]
True ifFileExists and
There are the following texts:
{"result":"success","data":[{"ip":"60.18.151.27"},{"ip":"175.22.2.148"},{"ip":"221.204.202.40"},{"ip":"113.107.250.17"},{"ip":"119.97.146.13"},{"ip":"113.56.106.20"},{"ip":"218.60.5.144"},{"ip":"218.58.225.40"},{"ip":"
Recently, in the process of sorting out bash knowledge, I had the honor to read the man bash document. For a while, I was just like a hacker, and many places I didn't understand were suddenly open-minded. Now I want to share one of them, at the same
This article introduces the array-related knowledge in linxu shell and provides many examples for reference, including array copying, calculation, deletion, and replacement, it is a rare article to learn shell arrays.
Array declaration:
1) array
I have been learning Shell recently. I used to think that Shell syntax is very difficult and hard to learn. Now I have some gains. In fact, Shell scripts are a collection of linux commands. You can understand what the commands in each step of the
THE sh file cannot be modified in windows.Because most people use windows as the operating system and the visual interface of windows is more user-friendly, when modifying a linux sh file, edit it with editplus to facilitate pulling it to the window,
HI, good morning. cantgis has met you again.Today, let's talk about the certificate. We use a lot of website verification certificates, including banks and entertainment websites. They will expire once a year.In the certificate list in Internet
Question 1: Get sequential numbers from 1 to 9Shell Method 1:
For I in 'seq 1 9'; do echo $ I; doneSimilar to seq 1 9 or seq 9
123456789
Shell Method 2:
For (I = 1; I Similar to for I in {1 .. 9}; do echo $ I; done
123456789
Python method
Recently, I am writing a gnome-shell plug-in. Generally, exceptions of the plug-in will be captured by gnome-shell. Once the exceptions of the plug-in are captured by gnome-shell, the plug-in will be reloaded up to two times ), because gnome-shell
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.