#!/bin/sh#mysql Address # Detects if the user entered the password manually mysql_host= "" #mysql用户mysql_user = "" #mysql密码mysql_password = "#mysql数据库名 # If you do not fill in the database name you want to export the error message and terminate
First, the basic operation of the database1) Log in to MySQL server: mysql-u root-p password2) View database: Show databases3) View table: Show Tales from DB;4) View table structure: DESC table;5) Creating Table: Create table table ();6) View Table
number of logged-in users: who | Wc-l
See which users are logged on to the system : who
Create a new file /bin/ct11, enter a command in the file,chmod Set the Execute permission for the file
# cat >/bin/ct11W.H.O. | Wc-lPress Ctrl+d# Cd/
Reprinted from Http://www.cnblogs.com/liyuhui-Z/p/7792108.htmlShell IntroductionAs a command language, the shell interprets and executes user-entered commands interactively, and as a programming language, it defines variables and parameters and
#!/bin/SHCurr_dir=$ (CD $ (dirname$0);pwd) Td_base=`su-Tduser-c"Echo"${td_base}""`functionchange_app_ip () {if[$#-ne3]; Then Echo "The Param is not correct."Exit1 fi if[" $"!="app_ip"]; Then Echo "The IP type is not
Shell echo CommandThe echo command of the Shell is similar to the echo command of PHP, and is used for the output of strings. Command format:StringYou can use echo to achieve more complex output format control.1. Display Normal string:" It is a test
Enterprise Practice Question 16:Enterprise Case: Write Network Service standalone process mode rsync system startup scriptFor example:/etc/init.d/rsyncd{start|stop|restart}.Requirements:1. To use the System function library technique.2. To use a
1. The idea before writing a scriptConsiderUnified Script ManagementPermissions: User execution permissionsEmpty the error fileError hintsScripting Versatility2.2 Unified Script Directory1 mkdir /server/scripts2 cd/server/scripts2.3 Creating a
For CentOS 7, run the following command with root user root :Cd/etc/yum.repos.d/wget Https://download.opensuse.org/repositories/shells:fish:release:2/CentOS_7/shells:fish: Release:2.repoyum Install FishFor CentOS 6, run the following command with
Input and output redirection in a Linux Shell environment, denoted by symbols . 0, 1, and 2 represent standard inputs, standard outputs, and standard errors, respectively.1. redirect standard output to file: Cat fo > foo.txt2. REDIRECT standard
first look at the effect What you need to do, configure the server information in the configuration file , Select the corresponding server , and make the connection. Traditional Manual ConnectionSSH [email protected] # then enter server
Shell Synthesis Example (i)To back up the system configuration file:1, scheduled task service configuration file/var/spool/cron/root2. Boot from boot profile/etc/rc.local3, the Daily script directory4, Firewall iptables configuration
The path is not shown in the Linux shell, and it is inconvenient to use it as a-bash-4.1#.How do I change the shell to show the path?The steps are as follows:Vim ~/.bash_profile(No tube. Bash_profile This file has a few, you can create a new one is
Pipe characters and variablesOne, the pipe character and the job command1.txt |wc–l; Cat 1.txt|greap ' AAA 'The command for the pipe character is to give the result of the previous output to the following command2.ctrl z pause a task3.jobs viewing
Shell IntroductionThe shell is the intermediate medium used when the system interacts with the computer hardware, and it is just a tool of the system. In fact, there is a layer of stuff between the shell and the computer hardware-the system
Shell Programming Concepts(1) Shell is a command-line interpreter, there are many kinds of shells(2) The shell as a bridge between the Linux kernel and the user, the user by default cannot directly manipulate the kernel(3) can be operated through
Statistical analysis of log files in the number of accesses per IP and sorted from high to low?Download the file to a local suffix#!/bin/bashawk? ' {print?$1} '? ip.log?|? Sort?|? Uniq?-c?|? Sort?-rn?|? MoreSh-x uniqip.sh?+ awk ' {print $} ' Ip.log+
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.