How to execute multiple. sql files at the same time in a shell script and write the end to the file

First edition:#!/bin/Bashuser="root"DATABASE="test" TABLE="user"-u $USER $DATABASE--html--default-character-set= UTF8 /tmp/-u $USER $DATABASE--html--default-character-set=utf8 >/tmp/c Heck.htmlSecond Edition:#!/bin/Bashuser="root"DATABASE="test"

Using SendMail to send messages in the shell

Cat > Sendmymail.sh#!/bin/bash/usr/sbin/sendmail-t from:mail testing to : [email protected]Cc: [email protected]BCC: [email protected]Subject:mail Testing----------------------------------                                This is the mail content ...--

The shell condition determines if the-Z to-D meaning

The shell condition determines if the-Z to-D meaningShellfilestringless Terminal user[-A file] is true if file exists.[-B file] True if file exists and is a block special file.[-C file] True if file exists and is a word special.[-D file] True if

Scripting Shortcuts: A tool for simplifying shell Terminal command input

1. Issues to solveWhen you need to enter a number of commands at once , such as deleting files in multiple directories at onceCD Dir1RM file1.tempCd.. /.. /dir2RM-RF Dir3When you are too lazy to enter a good long command or simply can't remember

Substitution of shell variables

1 Shell Variable BasicsThe shell variable is a very "weak" variable, by default a variable holds a string, and the shell does not care what the string means. So for mathematical operations, you must use some commands such as let, declare, expr,

Shell File Size calculation

Du simple Usage exampleDu-SH xmldb/Du-Sm* | sort -n //statistics current directory size and size sorting du -sk *| sort -ndu -sk * | grep guojf //look at a person's size du -m | cut -d "/" -f 2 //See text before second/character See how

Every time you read a specified directory, a specified number of file shell scripts

#!/bin/shpath=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbinlang=zh_cn. gb18030export path langanalyzer_home=$ (cd  "$ (dirname ") ";  pwd) cd  $ANALYZER _ Homedeclare -a filearrecho $1 ", " $2function listdirfile ()  {   #fileArr = ()

Self-paced shell scripts

First, learn Zhao Wenyu's summary script:1. Variableshost=$ (/bin/hostname)Assigns the result of the command executed in () to the host variableHost= '/bin/hostname 'Assigns the execution result inside the anti-quotation mark to the host

A shell script that automatically restarts after a Linux monitoring process crashes and hangs

How do I keep the service running? How can I ensure that the service is automatically restarted even if it is hung up? This is often a problem when you write a service program. In a Linux system, a powerful shell can handle such transactions with

Linux Shell Recording and playback of terminal sessions

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

Bourne again shell built-in command

The built- in command (build-in commands) is the command of the shell Build-in, and when built-in commands are used, the shell executes directly without creating a new child process. Built-in commands are used to create functional or convenient

Shell's sed command

SED is designed to handle all editing tasks at once, particularly efficiently, saving users a lot of time, and SED is suitable for the following three scenarios:1. Edit files that are too large relative to the interactive text editor;2, editing

Linux Shell Script Raiders notes Chapter III: File Operations

Linux Shell Script Raiders notesChapter III: File Operations1, the production of any size file [[email protected] dd_test]#[[email protected] dd_test]# dd If=/dev/zero of=junk.data bs=1k count=1010+0 Records in10+0 Records out10240 bytes (Ten kB)

Hadoop (ix)-hbase shell command

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

CentOS Linux Next tomcat stop, view log shell script

The Tomcat installation directory for CentOS:/usr/local/tomcatVI mytomcatuitl.sh creating fileschmod u+x mytomcatutil.sh Assignment Execution permissionsShell script:1#!/bin/Bash2 3 # tomcat Start, stop, log display script4 5 if[ $1=="']; Then6

Shell's Read command

I. OverviewThe read command receives input from a standard input (keyboard), or other file descriptor. After the input is received, the Read command puts the data into a standard variable.Ii. examples of use (here are just a few common options)1.

Emacs executes commands in shell edit buffers

-Execute one command at a timeM!-Executes a shell command and puts the result in the current edit bufferC-u M!=============================The following formally enters the shell edit buffer=============================-Start Shell Edit bufferM x

Shell Bulk Add Users

Bored to see a face test, requires the shell script to create 100 users, named: student001...student100:#!/bin/bashfor num in ' seq-w ' Do/usr/sbin/useradd student$num echo ' Password ' |passwd--stdin student$nu MdoneAlso, ask for an account

Shell exit, return summary, shell exit summary

Shell exit, return summary, shell exit summary Common Responses in shell: exit, breakm, return Exit: In fact, after each command is executed, an execution state is returned! If the execution is successful, 0 is returned. If the execution limit

Java beauty [from cainiao to expert drills] using shell scripts in Linux (1), javashell

Java beauty [from cainiao to expert drills] using shell scripts in Linux (1), javashellAuthor: erqing Personal site: zhangerqing.cn mail: xtfggef@gmail.com Weibo: http://weibo.com/xtfggef Shell scripts combine multiple commands and write them

Total Pages: 541 1 .... 274 275 276 277 278 .... 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.