https://www.zhihu.com/question/21418449Mort | Zsh vs. Bash: Incomplete contrast resolution (1) 2014-10-07BdpqlxzWhat's the difference between zsh and bash?A lot of people have written about "why zsh is better than bash", "Why zsh is better than
Read Catalogue
First, everything is a string
Two, references and metacharacters
Three, where does the string come from, where to go
Four, plus a little bit of definition, you can push to export the entire Bash scripting language
Linux system learning notes: BASH programming uses var (elementelement...) to create array variables. When referencing elements in an array, use $ {var [I]}, I as the subscript, subscript @ to copy the original array, and subscript * to copy the
Ix. unfoldingThe expansion of the command line is done after splitting the word into words. There are seven types of expansion: curly brace expansion, wavy line expansion, parametric and variable expansion, command substitution, arithmetic expansion,
One:The shell is the shell of the Linux/unix system, and it can be understood as the command line interface, where you enter and execute the command line.Bash (born again shell) is one of the shell's most commonly used shells. you run on your Linux:
Learning bash notes-input and output, bash hide output1. I/O redirection
The I/O redirection is as follows:
Cmd1 | cmd2: pipeline that receives the standard output of cmd1 as the standard input of cmd2.
> File: redirects standard output to file.
Script Security
All of my bash scripts start with the following lines:
The code is as follows
Copy Code
#!/bin/bashSet-o NounsetSet-o Errexit
Doing so avoids two common problems:
Reference to an undefined
Iii. Command HistoryBash has absorbed a lot of essence from the Korn shell and the C shell, one of which formally holds the feature of a cached copy of the executed command, which we call the "command history" feature.Why should we use the command
Bash programming arrays and string handlingDirectoryNote Date 20180405ArrayFame (Create) array declare-a array_nameAssignment of array elements array_name= ("VAL1" "VAL2" "VAL3" ...)Referencing an array element: ${array_name[index]}Bash's string
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.