LinuxSmall Brackets()and curly braces{}is the execution of one of these commands, but there is a certain difference, and its specific meaning is as follows:(): Commands within parentheses are executed in a child shell (()): Compare and calculate the
8.1 Shell IntroductionThe Linux shell is simply a process of a command line and user interaction. You make an order and it will result. Similar to the CMD window inside windows.8.2 Shell Command HistoryAll the commands that have been knocked out
Reference: http://cn.linux.vbird.org/linux_basic/0320bash_1.phpShell variable function : A variable is a set of words or symbols, etc., to replace some configuration or a string of reserved data! Echo This command to take the variable: Echo $PATH,
Special symbols
Wildcard characters, any character? Any of the characters. #注释字符\ de-Semantic characters| Pipeline
Several commands related to pipelinesCut select information for the row analysisMain parameters-B: Split in bytes. These
Shell Basics
What is a shell?
Shell is a command-line interpreter
The shell is also a very powerful programming language that can invoke Linux commands directly in the shell
How the script executes
8.1 Shell IntroductionShell Introduction8.2 Command HistoryCommand-historyHistory environment variablesEmpty the history configuration fileModify the history fileEnable the history variable to take effectEnable history to take effectCan only append,
The test command in the Shell is used to check if a condition is true, and it can be tested in three aspects of numeric, character, and file.Numerical testParameter description-eq equals True-ne is not equal to true-GT is greater than true-ge is
Note: If you are the factory of children's shoes, write homework to find this article, I hope you do not copy ^_^, in fact, try to knock on your own will help you a lot.The title requirement is to student.txt the results of each stage of the
Linux Modify shell command prompt and color1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:[Root@~/wade/
A Linux shell script Shell: command-line interpreter(1) SH(2) CSH(3) Ksh(4) Bash Shell script: A collection of commands that accomplish a specific thing Two run a shell script file 1. Add executable permissions, and then run the./shell script file2.
Sync Post: http://blog.hacktons.cn/2017/12/13/shell-func-return/BackgroundWith Shell programming, custom functions are often required to write some tools for batch processing. In the case of more complex points, it may be necessary to return a value.
1, the database is fully prepared to the hard disk[[Email protected] scripts]$ cat rman_backup.sh source /home/oracle/.bash_ profile rman target / log=/home/oracle/backup/backupall_rman.log2. Incremental backup ScriptLevel 0
Shell echo CommandThe echo command of the Shell is similar to the echo command of PHP, and is used for the output of strings. Command format:StringYou can use echo to achieve more complex output format control.1. Display Normal string:" It is a test
Shell Test CommandThe test command in the shell is used to check if a condition is true, and it can be tested in three aspects of numeric, character, and file.
Numerical test
Parameters
Description
-eq
Basic operation of VIA) Enter VI after the system hint sign VI and file name, go to the VI Full screen editing screen: $ VI fileHowever, it is important to note that after you enter VI, you are in command mode and you want to switch to insert mode
01. Field Extraction Command Cut + = cut [option] file name-F Column Number: Extract the first few columns-D delimiter: Splitting columns by the specified separatorFor example: Cut-f 2,4 (column number;, comma can extract multiple rows)
I wrote a shell script today, hoping to simplify the problem of login proxy server, but when script was written, it found that the environment variables were not obtained as expected.In order to make everyone understand, post the script content for
The cause of the bad interpreter:no such file or directory is an issue with the document format. This file was written under Windows. Line wrapping is not the same as UNIX, but under vim if it is not set a bit and it is completely invisible.Problem
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