shell recognition: built-in commands, Shell functions, and external commands: (1) the built-in command is the command executed by the shell itself. some commands are built-in because of their necessity. For example, if CD is used to change
The following describes the direct insertion sorting, binary insertion sorting, table insertion sorting, and shell sorting in sequence.
1. Sort directly inserted
It is a bit similar to playing poker. Every time you grab a card, you can put the
Introduction to several common Shells
Linux provides a variety of shell options. Frequently used include Bourne shell (SH), C-shelll (CSH), KoRn shell (Ksh), And Bourne again shell (BASH ).
(1) The Bourne shell is developed by Steven Bourne Of
From: http://blog.csdn.net/snrqtdhuqf/article/details/7242309
In shell, there are two ways to assign values to array variables:
(1) name = (value1... valuen) The subscript starts from 0.
(2) name [Index] = Value
Example:
#! /Bin/sh
Use the if statement to determine parameters in shell programming
-B. returns true if the file exists and is a block file.
-C: returns true if the file exists and is a character file.
-D. If pathname exists and is a directory, true is returned.
-E:
The parentheses in shell have their special usage, which are summarized as follows:1. brackets after the symbol $The value of $ {A} variable A can be omitted without ambiguity.$ (CMD) command is replaced and the result is the output of Shell Command
Windows supports a total of seven shell extensions,
They are:
Copy hook Handler)
Context Menu Handler)
Drap-and-drop Handler)
Icon Handler)
Property sheet Handler)
Drop target Handler)
Data Object Handler)
The copy hook handler is a simple shell
Do not add the parameter-V. Otherwise, you will test it on Linux.
VI autoftp. Sh
The content is as follows:
FTP-n-v-I
Linux Command (used to set file permissions) umask
022
The preceding command indicates that the umask value in Linux is 022.
SELF: http://lulu87.blog.51cto.com/1244696/373771
Case 1: use shell scripts for System Management
Lab Environment
The company is equipped with a Linux server for technical training at the Branch Office. Therefore, you need to add user accounts
One command alias settings: alias, unalias
Command alias is a very interesting thing, especially when your usual command is very long! In addition, you can add predefined attributes to some common commands to prevent accidental file killing! For
Kill-ring is definitely a wonderful design in Emacs. Many times I hate to add the clipboard of X WindowKill-ring. However, when I enter M-yThere will always be a lot of boring things in it. I may never post those things, because they are not
Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/
Color is selected by adding a special sequence-basically a numerical value between "/E [" and "m. If more than one numeric code is specified, separate them with semicolons.Echo-e "/E [31; 40 m"The
Classic sorting algorithm-shell sort
Shell sort is based onInsert sortIs also divided into two parts,
Part 1: Introduction to Hill sorting
The second part is how to select keywords. Selecting keywords is the key to Hill sorting.
Introduction to the
Variables and strings
Bash shell does not have the so-called "Data Form" unless the built-in declare is used to specify the variable type. In Bash shell, there is only one data type: A string consisting of Characters
Use it without having to go
Sed and awk
Background
When designing a script, you may need to modify the script, such as deleting or replacing some keywords. This method of dynamically modifying files during script execution is called Stream editing. A tool with stream editing
Process management and work control
Use of ps, top, and htop commands
Transmit signal
You can use the kill command to manage the signal sent by the process. The basic principle for managing processes is
1. First, send a signal to the process so that
Document directory
This article describes how to compile a shell script based on a large number of instances.
Why shell programming?
In Linux, although there are a variety of graphical interface tools, ghost is still a very flexible tool.
One of the most useful commands for me to use WinDGB is the. shell Command.
Debugging Tools For Windows Help file:
The. shell Command can load a shell process and redirect its output to the debugger, or redirect it to a specified file.
Arithmetic Operations and Comparison
1. Operator (let identifier)
+ Addition-subtraction * multiplication/division ** power operation 3 let "z = 5 ** 3" % modulo bash $ expr 5% 3
2. comparison operator (note that a space is required between []
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