SQL statement writes shell with log

OutFile is forbidden, or written files are intercepted;Operations in the database are as follows: (must be root permission)Show variables like '%general% '; # View Configuration Global general_log = on; # turn on general log mode Global

MUTT+MSMTP implementing e-mail in a shell environment

In order to automate the receipt of file backup information from the server, the MUTT+MSMTP is used to send e-mail in the shell environment, which is an easy and efficient way to complete operations.Download MSMTPwget

Bash Shell and process

1 exec BuiltinDo not create a child shell, start a new script on the original process, but it will clean up the environment of the old shell, so it does not inherit from the original shell, execute the new script in a clean environment. Exit the

The logical operators for Shell script programming

1. Logical operators;Logical operator Instances:A=Tenb= -if[$a! =$b]then Echo"$a! = $b: A! = b"ElseEcho"$a! = $b: a = b"fiif[$a-lt --A $b-GT the]then Echo"$a less than 100 and $b greater than 15: Returns True"ElseEcho"$a less than 100 and $b greater

The "shell" Linux shell determines whether the variable entered by the user is a number

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

Hbase-shell Study 1

CREATE table zn_post, column family CF1create ‘zn_post‘, ‘cf1‘ List existing tableslist Number of query recordscount ‘zn_post‘ Inserting recordsput ‘zn_post‘, ‘20180122-10000001‘, ‘cf1:name‘, ‘niewj‘ put ‘zn_post‘, ‘20180122-10000002‘, ‘cf1:

A method of translating shell scripts into binary execution files

Because of the need for plaintext to display passwords in the script, the idea is to encapsulate the already edited shell script into a binary executable file.Using the tool SHCOfficial Download site: http://www.datsi.fi.upm.es/~frosal/Use the

Basic operators for Shell script programming

1. Arithmetic operator: Native bash does not support simple math operations, but can be implemented with other commands, such as awk and expr,expr most commonly usedExpr is an expression evaluation tool that uses it to perform the evaluation of an

Shell Script Installation Nfs-server

#!/bin/bash: Program:NFS Server installbr/>[email protected]20171129 v1.020171130 v1.1 Modify the following:1. Cancel the grep "style" file &>/dev/null if [$?-ne 0];then Usage, modify to if grep-q "style" file; then method2, all changed to function,

The Advanced shell script

I. Condition selection, judgment (if, case)1.1 If statement usage and examplesWhen we encounter the need to judge in the script, we can use the IF statement to implement. The specific syntax is as follows:Single Branchif judgment condition;

"Shell" Linux shell location variables detailed

Linux Shell location Variables in detail what are positional variables? Simply put, when the user runs the script, input parameters, the variables corresponding to these parameters are called positional variables.

The use of parentheses in the shell Linux shell

Overview of the use of parentheses in the Linux shell 本文主要介绍Linux中括号的用法,主要包含判断文件和变量。**注意事项**:中括号两边必须有空格。The knowledge involved in using brackets &&, | | | 在本文对文件或者变量做判断的时候,可能会多次使用到&&和||这两个符号,所以在我们进入中括号的学习之前首先了解一下这两个符号的作用。 &&:

Shell Script Instance

#!/bin/Bashsrc_path=/mnt/source/xx/xx# Merge All specfile forQuick Searchmergedspec="./allspec-"$(Date+%y%m%d). txtfunctionmerge_all_specs () {Allspec=$(Find$SRC _path-name *. Spec) forSpecfileinch$allSpec DoSpecname=$(basename$specFile) Specprefix=

Basic concepts of Linux shell programming

Shell programming is actually a program that combines multiple commands, based on bash.Serious attentionThe difference between $hostname and $ (hostname)$hostname is to take the value of the hostname variable$ (hostname) is the execution result of

Shell exercises (13)

Exercise 1:Formatted outputRequirements: Enter a string of random numbers and then output by thousand. for example, the input number string is "123456789", the output is 123,456,789#/bin/bash# date:2018 March 15 read-p "Please input a long number:"

Linux timed release cache shell scripts for automated operations

Users of the Linux server should know that when Linux is in use, the available memory will slowly become smaller over time, and it may eventually reach 80%-90%, which requires us to intervene manually to release the Soul village.This article will

Linux Shell daemon/RAC Restart script

To establish a daemon process:#! /bin/sh PRO_NAME=./xxxx.sh while true ; do #用ps获取$PRO_NAME进程数量 echo ‘‘> nohup.out NUM=`ps aux | grep -w ${PRO_NAME} | grep -v grep |wc -l` #echo $NUM #少于1,重启进程 if [ "${NUM}" -lt "1"

Use of shell special variables

$ Current PIN name$# the number of arguments passed to the scriptThe first parameter, and so on$*,[email protected] All parameters$$ Current Shell Process IDShell output shell name, PID, number of parametersList parameters in sequence#!/bin/bashecho"

Automatically log on to the server shell script

#!/bin/bash#Description: Auto Login The remote server#Author: Majinxu#Version: 1.0#CreateTime: 2018-3-012 18:34:41User= "Majinxu"Passwd= "! Ieric1234 "host_list= ("st1.qa.bj2.yongche.com""St2.qa.bj2.yongche.com""St3.qa.bj2.yongche.com")#seletc the

Linux Learning Notes (25) Shell special symbols, Sort_wc_uniq, tee_tr_split

one, special characters 1.Any character of ' * '‘? ' Any one character' # ' comment characters' \ ' de-semantic characters' | ' Pipe characterMost of them have been used before, for the caret ' \ 'Examples of the use of the caret2. Several

Total Pages: 541 1 .... 437 438 439 440 441 .... 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.