Crontab let Linux execute shell scripts at timed intervals

Use crontab you can perform a specified time in the Shell script or a series of Linux command. For example, the system administrator schedules a backup task to run every dayEntry# crontab–eThis enables the edit mode to open the personal crontab

Crontab let Linux execute shell scripts at timed intervals

Use crontab you can perform a specified time in the Shell script or a series of Linux command. For example, the system administrator schedules a backup task to run every dayEntry# crontab–eThis enables the edit mode to open the personal crontab

Usage of ${} in Shell

The following content is basically extracted from the Shell13 question.1. Truncation function${file#*/}: Take out the first/its left string: dir1/dir2/dir3/my.file.txt${file##*/}: Take out the last/and left string: my.file.txt${file#*.}: Take out

Shell Common Test commands

Pre-defined variables:Predefined variables are a class of special variables that are predefined by bash programs, and users can only use predefined variables, not create new predefined variables, or assign values directly to predefined variables.

Shell Application Tips

1. Press the TAB key for the command to be padded2, clear or ctrl+l clear screen3, ctrl+u Delete the command before the cursor4. History view executed commands5, the key of the arrow keys can see the executed command1. Command aliasesExample: Alias

Linux shell String Operations (length, find, replace)

Thanks to the original, the article is very helpful.Transferred from: http://www.cnblogs.com/chengmo/archive/2010/10/02/1841355.htmlFirst, Judge read the string value An expression meaning

SVN rolls back to previous version of Shell script

#!/bin/SH############################### -- -- the# # author Jackluo # # email [email protected] ############################## #version_list=$ (SVN log--limit2|sed '1d'|sed '$d'|awk-F'|' '{print $}'|awk-V rs="" '{gsub ("\ n", "");p Rint}')

Shell, switch user, execute specified, script

In some cases, such as Oracle, you must switch to the specified user to restart Oracle.Each time the manual operation is more troublesome, you can write a script.The function of automatically entering password, need to use expectInstall firstYum

Bash Shell Learning-Regular Expression Basics (note)

A gentleman is open-minded and optimistic; A small person is narrow-minded and pessimistic."The gentleman is magnanimous, the villain long Obsession"Reference: Bird Brother's Linux private cuisine Basic Study (third edition)The basis of regular

Shell Basics 3

Cut is a selection command:is to analyze a piece of data and take out what we want. In general, the selection of information is usually for "line" to analyze, not the entire information analysis.(1) The syntax format is:cut [-bn] [file] 或 cut [-c] [

Shell Review notes----commands and Parameters

The basic job of the shell is to execute commands.The shell executes each command you type.$CD work;ls-l whizprog.cFirst: The format is simple, separating the various components of the command line with a blank Space key or TAB key.Second, the

Linux Shell Script Raiders (1.10)

1.10 Get, set date and time delay Many applications need to print the date in different formats, set the date and time, and perform an action based on the date and time. Latency is typically used to provide a wait time (for example, 1

-while Application Example of shell application

Like other languages, loops are also script patterns in the shellOne. Grammar:      while  [expression]                  do                   operation ...                  done As long as the expression in [] is set, it will continue to loop.

Shell programming under Linux--startup script for the standard daemon

a standard daemon startup script:#! /bin/shwhoami= ' WhoAmI ' pid= ' ps-u $WHOAMI | Gerp Mydaemond | awk ' {print $ ' if (test "=") Thenecho "Mydaemond [Start][stop][version]" Exit 0fiif (Test "=" status ") thenif (test "$PID" = "") Thenecho "not

Five ways to assign variables to the "Linux" shell programming

1. Types of variables in the shellVariables in the shell can be divided into environment variables, positional variables, predefined special variables, and user-defined variables,2. Environment variablesEnvironment variables in the shell are a

Shell script variables and string interception

Variable Description:$$ The shell itself PID (ProcessID)$! PID of the Shell's last running background process$? End code of last Run command (return value)$-flag at a glance using the SET command$* all parameter lists. such as "$*" in the Case of ""

Using the shell for mathematical operations

You can use, let (()) [] perform basic arithmetic operations, and use advanced operations bc more efficiently.Look directly at the code and the output is clear.Let[Zhengweiwu A: -~]$ no1=4[Zhengweiwu A: -~]$ no2=5[Zhengweiwu A: -~]$ Letresult=no1+no2

Shell introduction and Getting Started

1. What is bash?Bash is a Unix shell written for the GNU program and is the default shell used by many Linux platforms.The shell is a command interpreter, an insulating layer between the operating system kernel and the user. At the same time, the

The use of shift in the Linux shell

Position parameters can be usedshiftcommand to move left. Like whatshift 3Indicates that the original$4Now become$1, the original$5Now become$2Wait, the original.$1、$2、$3Discarded$0Do not move. With no parameters.shiftcommand is equivalent toshift 1。

The shell script is used to add a user to delete a user's deleted files,

The shell script is used to add a user to delete a user's deleted files, #/Bin/bash # DEBUG = 0ADD = 0DEL = 0RM = 0 while [$ #-gt 0] docase $1 in-v |-verbose) DEBUG = 1 shift ;; -h | -- help) # help document echo "'basename $ 0' -- add LIST -- del

Total Pages: 541 1 .... 187 188 189 190 191 .... 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.