Backing up the database regularly through the shell

Demand: Daily 2:10 back up the database zhengdb to/data/backup/db. The start and end of the backup can give the appropriate information. The backup file identity standard is the backup time as the file name, and packaged into a. tar.

Variables of Shell programming

Variable setting rules1. Variable names can consist of letters, numbers, and underscores, but cannot begin with numbers;2, in bash, the default type of the variable is a string, if you want to do numeric operations, you must specify the variable

Shell Script Basics

Shell script: A text file that contains some commands or declarations and conforms to a certain format Format requirements: First line shebang mechanism #!/bin/bash #!/usr/bin/python #!/usr/bin/perl The

Shell programming file testing and if multi-branch statements

File Test usage: -e :判断文件是否存在,如果不存在返回的状态为假 -f :判断文件是否为普通文件 -d :判断是否为目录 -x :判断当前用户是否可执行此文件 -w :判断当前用户是否可写此文件 -r :判断当前用户是否可读此文件 如 [ -e /etc/inittab ]If multi-branch statement if 条件一 ;then 执行语句 elif 条件二 ;then

Shell programming string comparisons and for loops

One, string comparison 字符串比较使用:= ,==,!=,\>,\ , \ ‘aa‘ 字符串是否为空判断: 如:- n string 判断字符串string是否为空,不为空返回真,-z string 判断字符串是否为空,为空返回真。Second, for Loop用法: for 变量名 in 列表 do 循环体 doneIii. Scripting Exercises1.

Send nail group messages through a robot in the shell

scene: In peacetime work, often need to perform some scheduled tasks, and when the timing of the failure to perform tasks need to come to the nail group, using the [nail robot] can easily and quickly help us do this thing. Simple to use

Linux_ (4) Shell programming (bottom)

Five, Shell Process Control1. A heavy BranchIf statement syntax format:If conditionThenCommand1FiThe FI at the end is the if inverted.Write a line:if condition; Then Command1; Fi2. Two branchesIf ELSE syntax format:If

Remote disk partitioning with shell scripts

Learning about Linux, some time ago to learn the shell script, wrote a very simple script, remote other virtual machine to partition the disk, their own pure hand, but also a record of individual learning process, the great God can skip!Here is the

Shell Script Detection Service

Lab Environment:System: centos7-3.10.0-x86_64Testing Services: apache-tomcat-9.0.7Experimental reasons:Because the current environment for the Java test environment, so did not monitor, but recently found that the service is automatically down, and

Common commands in the shell

Shell Special Symbol Cut command* * indicates wildcard characters?? represents an arbitrary character# #号注释字符, the annotated content will not take effectThe \ \ symbol denotes the caret character, leaving the special symbol out of the original

Shell Change Programming One

A 1.shell programming language is a dynamic language (a weakly typed language) that interprets side execution at run time, does not need to be declared before it is used, is declared in use, and does not even differentiate between variable types,

Shell Script-Introduction

Shell and shell scripting differencesShell: Refers to an application that provides an interface through which the operating system kernel services can beShell script: A script written for the shellExecution of Shell scriptsPass./execute instead of

Special variables in the shell

$: The file name of the current execution script$n: N is the natural number, the first parameter is $ A, the second argument is $, and so on$#: Number of parameters$*: All parameters, a string, for example,./a.sh 1 2 3, then $* is "1 2 3"[Email

Shell features, wildcard characters, input and output redirection, command history

One: Shell introductionThe shell is a command interpreter that provides interaction between the user and the machine, supports specific syntax, and each user can have his or her own specific shell,centos default of bash, and Zsh,ksh.Two: Command

Shell Error Output redirection

Turn from: Https://www.cnblogs.com/vijayfly/p/6234575.htmlshell redirect standard error output to a different locationThe following forms of command invocation can often be found in some scripts, especially when Crontab is called:/tmp/test.sh

Shell script Hollow lattice attention problem: = Assignment can not have spaces on either side, and if comparison judgment = Both sides must be plus a space

The shell script has strict rules for spaces, and there must be no spaces on either side of an assignment statement, and a string comparison with spaces on both sides of the equal signWhen assigning: I=1i=$ ((i+1))//= must not have spaces on both

Shell Basics (2)

Special symbols in the 1.linux shell(1) "*" represents 0 or more arbitrary symbols(2) "? "represents only one arbitrary symbol(3) "#" comment Description, "#" after the content will be ignored(4) "\" caret character, "\" After the special symbol

Django Shell Operations

Plugin: django-extensionsdjango-extensions==1.9.8PIP3 Install Django-extensions1. Database shell commands (under project directory)Python3 manage.py DbshellExecute SQL statement2. View the SQL statements for the Django

Shell Programming (2)

1. (1) Change the main prompt to the user's home directory name (hint: reference material 4.6.8 section environment variable PS1 and HOME usage)(2) Assign the string DOS file c:>\ $student \* to the variable x and display it (hint: note the choice

Shell conditional expression

In shell programming, it is often necessary to determine the status of a file, whether the string is equal, and two numeric values, and then perform the related operations based on these comparisons. This paper mainly describes the file status,

Total Pages: 541 1 .... 514 515 516 517 518 .... 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.