Last time I wrote the shell, I found that VI and VIM are different: Vim is the upgrade version of VI, it is not only compatible with all VI directives, but also some new features in it. Vim is much more useful than VI.This time the last content, the
Today, when running the shell script, the pin report is wrong as follows: -bash:./month_web_user_rc.sh:/bin/bash^m:bad interpreter:no such file or directoryThe cause of the problem and the solution are as follows: (excerpt from esther0401)One of
Once heard a great God told, with purpose to learn, knowledge often can remember prison, remember stability. With the help of mind Map this tool, some of the knowledge points I am interested in classification management. It is convenient for you to
Shell floating point arithmetic tool BCBC supports floating-point numbers, which is an advanced tool for mathematical operations.[[Email protected] Desktop]# BCBC 1.06Copyright 1991-1994, 1997, 1998, Free Software Foundation, Inc.This is the free
Processing of seq in a shellBackground: Using the shell to extract the contents of the file, the filename is generated with the serial number as follows, the file nearly more than 400 W is as follows:Www.ahlinux.comOriginal script#! /bin/sh#str1 = ""
1. Open the terminal and enter the help command to see a list of the built-in shell commands for the system's default shell (usually bash):[[Email protected] ~]$ help GNU bash, version4.1.2(1)-release (x86_64-redhat-linux-GNU) These shell commands
The Shell history record audit and monitoringHttp://netkiller.github.io/journal/shell.history.html Mr.Neo Chen(Chen Jingfeng),Netkiller, Bg7nyt China Guangdong province Shenzhen Khe Sanh Street, Longhua District, civil Administration518131+86 1311366
PS | grep $$ | awk ' {print $4} 'PS command without parameters displays the status of the process associated with the current terminal$$ variable stores the PID of the current processPS Fourth column is the command used by the process, if it is a
System Integrity Audit ToolThe shell script is as follows:The #!/bin/bash## variable is first declared to use shopt -s -o nounset# declaration # build Date date=$ (date + '%Y%m%d%H %m%s ') # join the approved directory #Dirs =
Today when writing a shell script to find the need to set the user's password, and the setting of the password is interactive, so in the script is obviously not very good, so the Internet to find information, found the following two non-interactive
#! /bin/bash################################################################################# Zabbix extensions (C) 2011-* Joseph Bueno # Published under GNU General Public License version 2 or later.# See LICENSE.txt#--------------------------------
1. FTP automatically logs in to batch download files.##### From/home/data on the FTP server to the local/home/databackup #####! /Bin/bashFTP-n Open 192.168.1.171User guest 123456.BinaryCD/home/DataLCD/home/databackupPromptMget *CloseBye!2. FTP
I am also a beginner in liunx. If there is any error, please point it out. Liunx: Ubuntu 14.04
I. liunx command Basics
Press CTRL + ALT + T to open the terminal in Ubuntu.
Basic liunx Command Format: Command [-options] parameter1 parameter2
1. The
Any shell script you run has access to (inherits) the environment variables accessible to its parent shell. in addition, any arguments you type after the Script Name on the shell command line are passed to the script as a series of variables.
The
Target
Implement recording of shell execution start time, end time, running status, error information, etc. Use the function to encapsulate log records and use scripts to call functions.Source code universal function script
How does Shell obtain parameters?
When writing a shell script, you often need to obtain parameters from the outside, for example:
$ sh demo.sh a
So how can we upload the above parameter A to the shell program.$0 $1... $10, where $0 is the name of
[Copyright statement: reprinted. Please retain the Source: blog.csdn.net/gentleliu. Mail: shallnew at 163 dot com]
Like printf in the previous section, the cycle judgment of awk is similar to the cycle judgment Syntax of C language.1. While
As mentioned above, variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special meanings. Such variables are called special variables.
For example, $ indicates the ID of the
Linux Shell Parameter extension (Parameter Expansion), parameterexpansion
The main reference: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
Other materials:
Shell Learning & amp; and | what is the difference?Before answering the questions in this chapter, let's first understand the concept of return value!Each command or function we run in shell will return a value of the parent itinerary at the
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