#!/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
$ () and ' (anti-quote)In the bash shell, $ () and "(anti-quote) are used for command substitution.$ echo the last Sunday was $ (date-d "last Sunday" +%y-%m-%d)Get the date of the previous SundayThe reason for using $ ()
' (anti-quotes) is
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
Shell after class summary
High wavesArchive: Learning NotesDecember 4, 2017 13:31:08
Shortcut keys:Ctrl + 1 title 1Ctrl + 2 title 2Ctrl + 3 title 3Ctrl + 4 ExampleCtrl + 5 Program CodeCtrl + 6 Body
Format
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
First, function definition and invocationA function is a series of commands that are customized in a shell script, and generally the function should have a return value (returning 0 correctly and returning a non-0 error). For error returns, you can
Shell: The command interpreter executes the corresponding command according to the command entered.See which shells are under the current system:Cat/etc/shellsView the shell that is currently in use by the systemEcho $SHELLCommon shell/bin/sh "has
Special Compliance 1. * Any of the characters 2. ? Any one character 3. # comment Character 4. \ de-semantic character 5. | Pipe character 6. The $ variable prefix, which represents the row bit 7. ; Multi-line command line input, split with
SED command Related:Https://www.cnblogs.com/ggjucheng/archive/2013/01/13/2856901.htmlHttps://www.cnblogs.com/DragonFire/p/6600121.htmlHere we have to do the function is:Enter a directory "/data/data8"Transform it to "\/data\/data8" in the shell
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
Enter parameter traversal########## [email protected] indicates a parameter string#!/bin/bashecho [email protected]For i in [email protected]; DoEcho $iDoneSelf-incrementAs far as I know, in bash, there are currently five ways to do this:1. i= '
I. Rights Management1. View file propertiesLs-l2. Permission TypeIi. Linux Users and permissions1. User Management① Viewing usersID User1② adding usersUseradd user1③ Deleting a userUserdel-r user11. User Group① New GroupGroupadd G1② Deleting a
Introduction to ArraysBash provides only one-dimensional arrays, and does not qualify the size of the array. Similar to the C language, the subscript of an array element is numbered starting with 0. Gets the elements in the array to take advantage
1. Take the IP address of the ifconfig eth0[Email protected] ~]$ ifconfig eth0Eth0 Link encap:ethernet HWaddr 00:0c:29:68:47:71inet addr:192.168.48.144 bcast:192.168.48.255 mask:255.255.255.0Inet6 ADDR:FE80::20C:29FF:FE68:4771/64 Scope:linkUp
Install Putty.exe, the following EXE files are installed in the installation directoryCreate File Put-file-mobile.txtRM Mobile.warput D:\SVN_LZY\dragon-tour-2_1\lzy-mobile\target\mobile.warexitCreate a batch file release-mobile.batPsftp.exe [email
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