following command:
$ ^nm^nam^
This will replace nm with nam in the uname command. Cool, right? It can not only correct the typos, but also run commands. View the following.
Use this technique when you enter an error in a command. Note that it only applies to Bash shell.
Additional tips:
Have you ever wondered how to automatically correct spelling errors when using the cd command? No? It doesn't matter! The following tips explain how to do this.
This
pattern is followed by a /, only directories and subdirectories match.
A shell script for testing and learning globstar is written as follows:
#! /Bin/bashfunction show(){ for i in ** do echo $i done} cd /root/jay/echo "------------------------"echo "disable globstar option:"# globstar is disabled by defaultshopt -u globstarshowecho "------------------------"echo "enable globstar option:"shopt -s glob
When you are using some commands, such as: LS, git, just met some requirements is to easily traverse all the directories and files, and then after the search, finally found a "magic" wildcard "* *" (two asterisks), after setting the bash globstar option, * * You can match any current directory (including subdirectories) and the files in it. So, to understand the Globstar this option, when not set Globstar, * * Wildcard function and * is the same, and
Calculates each parameter in a mathematical expression
Local
Creating a scoped variable in a function
Logout
Exit Shell Login
popd
Delete records from the directory stack
Printf
displaying text using a formatted string
pushd
Add a directory to the directory stack
Pwd
Displays the path name of the current working directory
Read
Reads a row of data from stdin a
Man CD---cannot be queried, so it prompts Bash's built-in commands. Alias BG bind break builtin Caller CD command Compgen complete compopt continue declare dirs disown echo enable eval exec Exit export false FC FG Getopts hash help history jobs kill let local logout mapfile popd printf pushd pwd Read ReadOnly r Eturn Set shift shopt source suspend test times trap True Type typeset ulimit umask unalias unset wait -
Basic syntax for BASH
The simplest example of--hello world!
About input, output, and error outputs
Rules for variables in BASH (similarities and differences with C language)
Basic Process Control syntax in BASH
Use of functions
2.1 Simplest example of--hello world!Almost all of the first examples of programming books to readers are t
The simplest example of--hello world!
About input, output, and error outputs
Rules for variables in BASH (similarities and differences with C language)
Basic Process Control syntax in BASH
Use of functions
2.1 Simplest example of--hello world!Almost all of the first examples of programming books to readers are the Hello World program, so let's start with this example today to learn more
Basic syntax for BASH
The simplest example of--hello world!
About input, output, and error outputs
Rules for variables in BASH (similarities and differences with C language)
Basic Process Control syntax in BASH
Use of functions
2.1 Simplest example of--hello world!Almost all of the first examples of programming books to readers are t
Understanding of the Bash environment variable Parsing Vulnerability
1. What are environment variables?Both Windows and Linux programs support environment variables. Generally, environment variables are stored at the beginning of the process memory space as value strings. When you execute a program, you can specify the environment variables to pass information to the program to be executed. On a Windows platform dominated by GUI, generally, users seld
Shell commonly known as shell (used to distinguish from the kernel), refers to the "user interface to provide users" command parser (software). It is similar to DOS command and later cmd.exe. It receives the user command and then invokes the appropriate application.At the same time, the shell is a programming language. As a command language, it interactively interprets and executes commands entered by the user, or automatically interprets and executes a predetermined sequence of commands. The sh
Some basic Bash ProblemsSome basic Bash ProblemsHere we will introduce some issues before and after bash is started, as well as some basic issues that need to be paid attention to when using bash.1. Bash IntroductionBash is a Shell program. It is the default Shell program in
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 Shell", the tutorial on how to configure zsh or toss various oh-my-zsh themes is a big basket, but rarely see zsh and
Recently there has been a "destructive level" vulnerability--bash software security vulnerabilities. The loophole was discovered by French gnu/linux enthusiasts Stéphane Chazelas. Subsequently, the United States Computer Emergency Response Center (us-cert), Red Hat and a number of companies engaged in safety in Wednesday (Beijing time September 24) issued a warning. Details of this vulnerability are available in the U.S. government's two disclosure of
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 syntax
V. Input/Output redirection
Vi. The aesthetics of the Bash scripting language: Boulevard to Jane
Summarize:
I confess that I once again
First, compile bash to implement the syslog logging function of Bash 1. This paper will realize the function of history record to syslog log through bash software, and it can be transferred to the remote log centralized server in real-time, which can realize the audit function of operation logs.Operating system version: CentOS 6.5 x642. Install 6.5 corresponding
Shell types:Sh-Bourne shell CSH or tcsh-C shell Korn-Korn shell bash-GNU Bourne-again shell
1. Simplest ColumnExample #! /Bin/bash # This is a very simple example echo Hello World
Explanation:
In bash, the first line "#! "And later"/bin/bash "indicates that the file is a bash
Article title: Bash instance (1 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Learning how to program with the bash scripting language will make daily Linux interactions more interesting and productive, while also taking advantage of the familiar and popular standar
input and executes the commands you submit. This pattern is called interactive because the shell interacts with the user. This mode is also familiar to most users: Log in, execute some commands, log off. When you log off the login, the shell terminates the run.The shell can also run in a different mode: non-interactive mode. In this mode, the shell does not interact with you, but instead reads the commands stored in the file and executes them. When it reads the end of the file, the shell termin
Article title: basic programming of Bourneagainshell (bash. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
It is already running
You may find that you are currently running bash. Bash is a standard Linux shell for various
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.