Script requirements are as follows: This shell script is placed in the Crontab planning task, every 6 hours (this time according to the actual situation) to read the/var/log/secure script, take out the malicious guessing IP, if the unit time (a week)
Need to use shell script every 3 seconds to monitor the running state of a software process, found that Crond seems to only support to the points, do not know seconds, how to do?
The first method:
Of course the first thought is to write a trigger
Linux--shell Programming variable assignment and reference
Linux shell programming is a very mature programming language that supports various types of variables. There are three main types of variables: environment variables, internal variables,
Syntax: WC [options] File ...
Description: This command counts the number of bytes, words, and lines in a given file. If no file name is given, read from standard input. The WC gives also the president count of all specified documents at the same
Recent programming uses SFTP upload files, and need to use crontab preset timed upload events. Unlike FTP, SFTP does not provide options such as-I can encode the password directly into the program. Using the SFTP directive, the user is automatically
Both exec and source belong to the Bash Internal command (builtins commands), where you can view all the internal command information by entering man exec or man source under bash.
The bash shell commands are divided into two categories: external
1.echoAndif else fiCommand#!/bin/bashecho hello;echo therefilename=demo.shif [ -e "$filename" ]; then echo "$filename already exists!";cp $filename $filename.bakelse echo "$filename does not exist!";fi;echo "File test complete!"Run result
First, what is the shell?
The shell is a scripting language aming_linux blog.lishiming.net
You can use logical judgments, loops, and other syntax
Functions can be custom-defined
The shell is a collection of system commands
Shell scripts
This problem occurs because of a line-wrapping problemUnder Windows, edit the script with a newline character of "\n\r", but under Linux, the line break is "\ n". After editing in Windows and then running under Linux, the line break only uses "\ n"
Installation of the zsh bodyFirst chsh -l , look at the current bash situation, as follows: If it is CentOS, use yum install -y zsh to install ZSH, zsh and then installed oh my zsh , using the Wget method to install wget
Login Shell: A full login process is required to go to bash. That is, by entering the account and password to log into the system, the obtained shell is called the login shellnon-login Shell: The method of obtaining the Sbash interface does not
Background: I have summed up some knowledge points about my common shell scripting style. Also as part of the handover work document. Part of the content is written separately#!/bin/sh# Shell Script Advanced Tutorial # 1. Common knowledge Points:
First, Templates filterFilters are part of the Django template languageModify variables in a template to display different content{{value | filter}}Example: {{list_nums | length}} indicates the length of the list{{Value | filter | filter | filter}}
Crazy DelphidelphiXE7, XE8, XE10 Open Class A group: 58592705 qq:513187410 Zhu Jianqiang bat-Add 7-zip browsing to file right-click menuREG ADD 7-zip Browse function to file right click menuWindows Registry Editor Version
Jenkins Automation Deployment Goal: Jenkins on point build (also automatically check code changes automatically build) "Project deployment complete." First, install the jenkins1. Download JenkinsHere I choose is the war package installs Jenkins,
Tag:expression calculator calculator #!/bin/bash# by inputting data calculating results expression= '; calculator () { echo "Please enter a number:"; read x; echo "Please enter another number:"; read y ; echo "Please
Original post: http://topic.csdn.net/u/20071101/11/4bf1047d-dc46-4b39-9766-4f05b0eeaca7.html
Shell syntax error: unexpected end of file error message [Closed, closed by: myepoch]
Add as a friend
Document directory
Task: display current bash prompt (PS1)
Task: modify current bash prompt
Task: add colors to the prompt
Task: how to make the prompt setting permanent
Tput command
Handy tput commands
Colors {code} code for tput command
If you want to quickly and easily understand shell programming, here is also a simple tutorial link: http://www.ooblick.com/text/sh/There is also a little deeper Cu shell version of the town board treasure classic thirteen ask
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.