Shell dynamic parsing of SQL Binlog

#!/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

Linux shell for multi-process

As a database DBA for Linux systems operations or Linux, there are many times when you need to write scripts to help us achieve some of the requirements, and if some content within the script can try parallel processing, it will greatly improve the

〖linux〗 upload a single file to the FTP shell command line (function)

1#!/bin/bash-2#===============================================================================3 #4# File:ftp_put_file.SH5 # 6# USAGE:./ftp_put_file.SH 7 # 8 # DESCRIPTION:9 # Ten# OPTIONS:--- One# REQUIREMENTS:--- A# BUGS:--- -# NOTES:--- - # author:

Linux prevents Rm-rf from accidentally deleting shell scripts

#!/bin/bash  #:set Ff=unix #:set Nobomb #-*-Coding:utf-8-*- ###################################################################### # # Filename:Trash.py ## # # Copyright (C) 2014.6 # # Author: [email protected] @qq. com

Linux Shell display-bash-4.1$ does not show the path of user name workaround

Linux CentOS under the shell display-bash-4.1$ does not display the user name path resolution problem Description: A new user is added under CentOS, and the shell script information is as follows: Instead of what we often see [email Protected] is a

Linux Shell Introduction

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

Linux Shell Common Skills (i)

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

[Shell] The relative path cannot be found when crontab executes the task and calls the shell script.

The scenario where the problem occurs is probably 1 cron calls a Python script 2. In the Python script, call a shell script (for log analysis) to obtain the shell output and then send an email. Similar to a monitoring task. There is no

Use of $ {},#and % in Shell

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:

Shell Command Basics

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 --

Shell if judgment statement

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

Shell sorting of data structures

# Size 10 // Insert the sorting directly Void insert_sort (){ Int I, J; Int array [size + 1]; Array [] = {, 22 }; For (I = 2; I Array [0] = array [I]; J = I-1; While (array [0] Array [J + 1] = array [J]; J --; } Array [J + 1] = array [0]; } } //

Shell script entry notes

Getting started with shell script Note: 1. execute commands from top to bottom and from left to right;2. execute commands as mentioned in Chapter 5: multiple blank spaces between commands and options are ignored;3. blank lines will also be

[Shell] If common judgment Conditions

If judgment I have also written a simple shell script before, and it is not transferred to O & M. It has less work related to the system, so it is not very skilled. Recently, as the system has encountered various messy problems and no one has helped

Shell script ----- while loop and until Loop

While test conditions Do Statement 1 Statement 2 Done Test condition: if the condition is met, the loop is closed until the condition is not met. How does a while loop exit? Change the variable value corresponding to the test condition in the loop

Kvm_install and Shell

#! /Bin/bash /Etc/init. d/NetworkManager stop Chkconfig NetworkManager off Service iptables stop Chkconfig iptables off Setenforce 0 Lang = en. UF-8 Yum-y groupinstall "virtualization" "virtualization client" "virtualization platform"

How can I use shell scripts to automatically send passwords to capture remote logs?

In Linux, how does one use shell scripts to capture remote logs? There is a dilemma in analyzing online logs. There are too many machines. It is unrealistic to log on to each server, but it is more troublesome to download the logs because each SCP

[Shell] bash basic functions: Multi-command sequential execution and pipeline operators

/* Configure /*----------------------------------------------------------------------------------------------- @ Blackeye poet Optional -----------------------------------------------------------------------------------------------*/ 1. Multiple

Shell script (5)-Fast SSH login to other hosts with ultra-convenient scripts

If you use Linux as your work environment, this article is a good news! Because I often use SSH to log on to other hosts during my study/work (especially recently Playing Raspberry Pi), and every time I use SSH to log on, I need to enter a long

Shell script-regular backup based on the number of files

Tag: style blog HTTP color file 2014 Recently, when learning about Jenkins, there is a problem: the number of subdirectories under the Linux ext3 system directory cannot exceed 31998 (refer to: http://www.xshell.net/linux/1267.html), but Jenkins

Total Pages: 541 1 .... 198 199 200 201 202 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.