1.shell scripts are small-case2.Unix special characters are: (; $ & * () [] ' "+ Use it to escape ()3.Shell comments begin with #4. Definition of functionFunction Fuction_name () {Command to execute}Use Function_name directly when calling.5. Control
Friends who know more about operating system principles will know that a complete operating system provides a shell (shell) to make it easier for ordinary users to use the various features provided by the operating system. Windows (here refers to
2014-06-26 BaoxinjianI. Summary
When different system data are exchanged, there can be many ways, such as Mq,dblinkWhen it comes to some projects with more secure information, many companies use Unix shells to throw files directly.When using a
8.1 Shell Introduction8.2 Command History8.3 Command Completion and aliases8.4 Wildcard Characters8.5 input and output redirection
8.1 Shell Introduction
The shell is a command interpreter that provides interaction between the user
#!/bin/bashset-ecommand 1command 2...exit 0---------------------------------------------------------- every script you write Should include Set-e at the top. This tells bash, it should exit the script if any statement returns a non-true return
1. Monitor CPU information with Vmstat tools.Vmstat is a Linux system monitoring tool that uses the Vmstat command to get information about processes, memory, memory paging, blocking IO, traps, and CPU activity.R: The number of processes in the
Guide
When you're going to really manipulate your Linux system, there's nothing like a command-line interface that lets you do that. To be a Linux master, you must be able to understand the different types of shell commands and use them
Typically, there are two ways to detect network connectivity for Linux systems:1. Through "ping command + Destination IP" or "Ping + target IP domain"Note IP network detection for IPV6 address need to try ping6, while ping6 can not use parameter
One or eight basic character interception methods:1. Use the # operator. Removes the first occurrence of the substr left character (including substr) from the left side, preserving the right character.Usage is #*substrFor example:650) this.width=650;
Shell scripts fall into three categories: logon scripts, interactive scripts, non-interactive scriptsOneThe logon script is similar to the logon script in the computer settings under Windows and the collection of logon scripts under Account settings
Variable Description: $$ the PID of the shell itself (ProcessID) $! PID of the Shell's last running background process $? end code of the last Run command (return value) $- flag at a glance using the SET command $* all parameter
Small Q: A person's career success, only%15 is due to his professional skills, the other%85 to rely on his interpersonalRelationship. The technique of the world, soft and hard relative, professional technology is a strong skill, and based on the
1. More friendly display of the currently mounted file system
Mount | column-t
This command applies to any file system, and column is used to format the output as a list, and the main purpose here is to familiarize you with the usage of
from:http://blog.csdn.net/engledb/article/details/19623087 Six, common examples1. P commandThe command p is used to display the contents of the pattern space. By default, sed prints the input lines on the screen, and option-n is used to cancel the
If ....; Then....Elif ...; Then....Else....FiIn most cases, you can use test commands to test the condition. For example, you can compare strings, determine whether the file exists and whether it is readable, etc... The condition test is usually
How to determine the number of input parameters in a shell script submission: Junjie font: [Increase decrease] type: Reprint
This article mainly introduces the method of judging the number of input parameters in shell script, using the built-in
$ CD ' DirName $ ' and some special usages of pwd%/* shell variables in the command line state simply execute $ CD ' DirName $ ' is meaningless. Because he returns the "." of the current path.This command, written in a script file, returns the
Difference between 2.return and exit
Return means returning from the function returned to the main key function to continue execution, the return can be accompanied by a return value, specified by the argument after return, of course, if it
An error occurred while executing the script today, such:
root@ApFree:/usr/sbin# ./conntrack_num_graph.sh ./conntrack_num_graph.sh: line 9: syntax error: unexpected "then" (expecting "}")root@ApFree:/usr/sbin#
I am wondering, this script can be
Shell script execution error '\ 357 \ 273 \ 277': command not found solution, shell357
1. Delete the BOM and execute the following command under vi.
:set nobomb
2. cause:
The so-called BOM is the Byte Order Mark, which is a Unicode character that
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