1, edit the user's home directory of the. muttrc file, set the letter environment.
Copy Code code as follows:
# CAT/ROOT/.MUTTRC
Set Envelope_from=yes
Set from=owinux@sina.cn
Set Realname= "Owinux"
Set Use_from=yes
Set Rfc204
Like other programming languages, the shell supports A for loop.
For loops The general format is:
Copy Code code as follows:
For variable name in list
Todo
Command1
Command2
...
CommandN
Done
When the value of
A large number of files are required for testing, so a script is written to copy. A regular file name facilitates reference.
Copy Code code as follows:
#!/bin/sh
# file Name:batchcp.sh
# Author:zhouhh
#
This paper briefly introduces the method of installing Gearmand and starting under rhel5.7, for everyone to study for reference!
First of all, to the official website https://launchpad.net/gearmand/Download Gearmand source package, uploaded to the
Objective
In the business development process, often in the background to write some shell script processing data, but it is estimated that many people do not know that the shell script can also support multithreading, and very simple. This article
Shell script:
#!/bin/sh # # # Convert file from GB2312 to UTF-8 # path= "$" unset opt if ["$" = "Force"]; Then opt= "-c-s" fi if [-Z "$path"]; Then echo "Nusage: $ n" elif [!-e "$path"]; Then echo "Nerror:destination: $path does not exist.n"
Copy Code code as follows:
#!/bin/bash
# march-13-2006# Cpuuse Trigger script by Noel## Bash code to watch a running program ' s CPU usage.# if it ' s above a set value, it'll auto send an email.# You'll need to set a Cron job to run this
Access parameters
You can visit the command-line argument via PROCESS.ARGV, which is an array containing the following:
[Nodebinary, Script, arg0, arg1, ...]
That is, the first argument starts with Process.argv[2], and you can iterate through all
The while loop is used to continuously execute a series of commands and to read data from the input file; the command is usually a test condition. The format is:While Commanddo Statement (s) to being executed if command is TruedoneThe command
Open a text editor, create a new file with the extension sh (sh for Shell), and the extension does not affect script execution.Enter some code:
#!/bin/bash
echo "Hello world!"
"#!" is a contract tag that tells the system what
Today, writing scripts, encountering awk script to the shell of the case, the internet Google, found that there are some problems, through the pipeline, through Eval, feeling is very complex. So I thought to try it with read.First, a test file
In the shell we often have to face a problem is how to judge my interactive front-end, the user input is a number it? I'm going to have two ways of doing this here, so just say it here today.The first type: SED formatFirst: Let's start with the
Purpose: Use the Saltstack tool to deploy batch servers and automate the installation (uninstall) of services (such as MySQL).[[email protected] ~]# ll total dosage 304228-rw-r--r--1 root root 311516309 March
#!/bin/sh# back Tomcat Catalina. outCD/home/Log_bak #the filedate= ' Date'+%y%m%d-%h%m'' ARCHIVE=$DATE. Tar.gzfile="Tomcat_""$DATE. Catalina.out"#开始备份之前, write the backup information header to the journal file Echo" ">>Log.txtecho" ">>Log.txtecho"———
1. Iterate over each line in the file while read line; Do Echo $line; Done file. txtOrCat file. txt | ( while read line; Do echo $line; done)OrCat file awk ' {print} '2. Iterate over a word for inch $line; Do Echo $word; Done3. WC statistics
1. Introduction to environment variable configuration file 1.1 Source command:Source configuration file or . configuration fileAfter you modify the configuration file, you must log off and re-login to take effect, using the source command without
the function of the echo command is to display a piece of text on the display, which generally acts as a hint. the general format of the command is: Echo [-n] string where option n means that the output text is not wrapped, the string can be quoted,
A system that encounters a non-Dubbo framework in a project needs to dispatch the tasks of the Dubbo framework system.Tried the expect method, need to install TCL and expect Linux.First Dubbo The official documentation mentions the way Linux calls
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