Shell extract MSYQL specified database The following table creates a statement as a single file

Dbcn= "mysql-h172.16.1.194-uroot-p123456";d b=dsp_ad_center;ii=0;ct= ' $DBCN-n-E "select COUNT (1) from Information_sch Ema. TABLES as t WHERE t.table_schema = ' $db ' and t.table_type = ' BASE TABLE '; "'; mkdir-p/chenenhui/$dbwhile true;doif

Getting Started with Linux shell script programming (i)

Environment variablesSome commandsVarious environment variables often appear in shell scripts, so to write a script, you must first understand the environment variables. Common commands for handling environment variables are listed below

Linux Auto-install JDK shell script

Linux Auto-install JDK shell scriptA: This script runs the machine, LinuxB: The machine to install the JDK, LinuxFirst, on machine a where the script is running, you can log on to the machine B where the JDK is to be installed without SSH password,

Shell Basic Syntax

A Linux basic commands1.1. CP commandThe function of this command is to copy the given file or directory to another file or directory, which is very powerful.Syntax: CP [option] source file or directory destination file or directory1.2. MV

Shell Display with color font

echo Display in shell script with color display, echo display with color, need to use the parameter-e format as follows: Echo-e "\033[word background color; text color m string \033[0m" Example: Echo-e "\033[41;36m something Here \033[0m "where 41

The role of quotation marks in the shell

The function of quotation marks1 double quotation marks ("")1) Use "" To reference any character or string except the character $ (dollar sign), ' (anti-quote), \ (backslash). Double quotation marks do not prevent the shell from special handling of

Hadoop reading notes (ii) the shell operation of HDFs

Hadoop reading Notes (i) Introduction to Hadoop: http://blog.csdn.net/caicongyang/article/details/398986291.shell operation1.1 All HDFs shell operation naming can be obtained through Hadoop FS:[[email protected] ~]# Hadoop FSUsage:java Fsshell[-ls ][

Shell script: Print 99 multiplication table

Shell script: Print 99 multiplication tableToday in three different ways to achieve the shell script Print 99 multiplication table, the code is as followsMethod 1: Use a For loop (a.sh)#!/bin/shfor i in {1,2,3,4,5,6,7,8,9}do to J in {1,2,3,4,5,6,7,8

Very powerful shell written by Tetris

A Tetris that was written on the web with a Linux shell script. It's the best shell I've ever seen written. Share a bit.The original author information is in the comments of the script.#!/bin/bash # Tetris game# 10.21.2003 xhchen #APP declarationAPP_

Shell text filtering Programming (a): grep and regular form

"Copyright notice: Reprint please keep Source: Blog.csdn.net/gentleliu. mail:shallnew at 163 dot com "There are many files in the Linux system, such as configuration files, log files, user files, and so on. The file contains a lot of information,

Shell If parameter meaning list

[ -a FILE]  如果 FILE存在则为真。  [ -b FILE]  如果 FILE存在且是一个块特殊文件则为真。  [ -c FILE

Shell Font Color display

Format: "\033[display mode; front color; background color m string \033[0m"\033: Starting an escape sequence[: Start Color definitionThere are several ways to display the method:0 Terminal default settings1               高亮显示4               使用下划线5   

Shell function function

1. FunctionsShell functions, which are used to customize a segment of a program. To simplify the code. Grammar:Funtion fname () { //do something}The shell is top-down, executed from the left and right. So the definition of the function needs to

Shell capture system CPU memory disk Network information

CPU Information Acquisition CPU UsageAcquisition algorithmCollect and calculate total CPU usage or single core utilization with/proc/stat files. Take cpu0 as an example, the algorithm is as follows:1. Cat/proc/stat | grep ' cpu0 ' gets cpu0 's

function of Shell syntax

A function is a block of script code that is given a name and can be reused anywhere in the code. Whenever you need to use such a block of code in your script, simply reference the name of the function that the block is assigned to.Create a

Time Format method in Shell

In shell, the display format of commonly used date is as follows: Date + % f // 2007-03-06Date + % Y % m % d // 20070306 Date + % t // 23:37:11 // YesterdayDate + % Y % m % d-d "-1 day"// TomorrowDate + % Y % m % d-d "+ 1 day"// Last monthDate + % Y

When the shell script is executed, the following error occurs: Command not found.

1. Delete the BOM and execute the following command under VI. : Set nobomb 2. cause: The so-called Bom is the byte order mark, which is a Unicode character that usually appears at the beginning of the text to identify the byte order

Shell tutorial 2-Variables

Shell supports custom variables. When defining a variable, the variable name does not contain a dollar sign ($), for example: Copy text-only new window  Variablename = "value" variableName="value"Note that there is no space between the variable

Analysis of Shell web crawler instances

The day before yesterday, I briefly shared some opinions on using shell to write web crawlers. Today I specially sent the code and shared it with 51 bloggers. I still love technology, open source, and Linux. For the annotation and overall conception

Use an automated shell script to find detailed thread information used by the CPU.

Use an automated shell script to find detailed thread information used by the CPU. After some interceptor code is added to the project, the CPU alarm shows that the CPU usage exceeds 100%; If you want to find out which code consumes too much

Total Pages: 541 1 .... 170 171 172 173 174 .... 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.