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
While others are demonstrating certain commands, one of the solutions is to record the process at the time of presentation, and the video is of course the most perfect but cost-efficient. Use the script and Scriptrelay commands to record the order
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
1. Enter the HBase command line./hbase Shell2. Display the list of tables in HBase3. Create a user table with info, data two column familiesCreate ' user ', ' info1 ', ' data1 'Create ' user ', {NAME = ' info ', VERSIONS = ' 3 '}4. Insert the
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,
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
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
1. Exit statusIn a Linux system, every time a command executes, the system returns an exit state, which is stored in the variable, which is an integer value that we can determine whether the command is running correctly.Typically, the exit status
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
Method 1:Use Linux iconv to convert the Utf-8 log to GBK encoded file, and then gbk the statistics in the environment. UTF8 () { log_file= "/lcims/crontab_shell/outfile/lan_wlan_wo/socketmain.log141114_lan1" LOG_FILE_TMP= "/
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
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_
"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,
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
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
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
Shell Programming Application: Automated website backup and shell AutomationRsync is a data image backup tool in unix-like systems-remote sync. A Fast Incremental Backup Tool, Remote Sync, supports local replication or synchronization with other SSH
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
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