This article mainly describes the shell script in the execution of SQL statements 5 ways to operate MySQL, this article explains the SQL statement embedded directly into the shell script file, the command line calls a separate SQL file, using the
Article Source: http://www.jb51.net/article/53924.htmThis article mainly introduces the 4 methods of executing shell scripts in Linux, that is, 4 ways to run shell scripts in Linux, and the friends you need can refer to the followingThere are
/********************************************************************* * Makefile How to use shell if judgment * Description: * For example, it may be necessary to determine the existence of files, folders in Makfile, use shell syntax * To output
use of function functionsDefining functions1)Function name () {......}2)Function name {......}Calling functionsFunction nameYou can also pass parameters to a function by positional variablesExample:Scripting, Implementing directory management
The new handwriting of the shell, write bad, please forgive us.Hope to make some great gods and peers. qq:86416192 welcome everyone to add QQ.1, write a script, show how many users, and display the ID of each user.#!/bin/bashFile= "/etc/passwd"lines=
I. Brief INTRODUCTION 1. What is a shellThe shell is a program written in C that is a bridge for users to use Linux.The shell is a command language and a programming language.The shell can also refer to an application that provides an interface that
Set is a shell internal command to turn shell feature properties on or off, and if nothing is added, the user-defined variables and environment variables are displayed directlySyntax: Set [Options ...]Options:- F : Disable wildcard characters+f :
There are some files and folders under the current folder, and there are several. txt files in each folder.Now requires a new folder to be created in the current folder all, and those folders all. txt filesare copied to the folder all. The shell
Syntax format for if structureSingle branch structureIf then Directives fiif ; Then command fiDual-branch structureIf ; Then instruction 1else instruction 2fiMulti-branch structureIf ; Then instruction 1elif instruction 2elif instruction
Shell IntroductionShell: Shell (different from: core)a shell in the ordinary sense is a program that can accept user input commands. It is called the shell because it hides the details of the lower operating system. Bourne-again Shell (bash): One of
Query IP on the Web page open URLs can be displayed, but at the command line can be installed w3m/links/lynx these command-line browser, but for this and feel inconvenient, so a lot of IP site to provide unix/linux.Command line query (verbose): Unix/
[-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 file exists and is a directory.[-E File] True if file exists.[-F file] True if file
1 . Deletion and substitution of variable contents# The representation is deleted from the front, so here it starts / deletes ,* instead of 0 to infinitely more than any character% Delete variable contents from behindFor example:echo ${path%:* bin}
Calculate Script Execution Time:#!/bin/bashUsetime () {Starttime= ' Date +%y%m%d-%h:%m 'starttime_s= ' Date +%s '$Command #根据自己脚本路径, test script File Execution time (SH test.sh)Endtime= ' Date +%y%m%d-%h:%m 'endtime_s= ' Date +%s 'sumtime=$[$endTime
Hell Programming--for in loop-------in format-------
For no $ variable in string
Do
$ variable
Done
A simple string to enumerate through the calendar, with the function of using the in format to cut the string by a space
With Crontab you can execute a shell script or a series of Linux commands at a specified time. For example, the system administrator schedules a backup task to run every dayEntry# crontab–eThis allows you to open your personal crontab profile in
Execute the following command under Hadoop 2.7.2 cluster:Spark-shell--master Yarn--deploy-mode ClientThe following error has been burst:Org.apache.spark.SparkException:Yarn application has already ended! It might has been killed or unable to launch
This article explains the advanced knowledge of shell variables.The following is a summary of the knowledge points, about the practice, this article does not involve, but also the small partners to practice their own!For special positional parameter
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