Bash is a Unix shell written for the GNU program. Its name is a series of abbreviations: Bourne-Again SHell-this is a puntion about the Bourne shell (sh) (Bourne again/born again)
Complete bash History Review
1. Download the bash-4.2 source code package and modify the source code to re-compile and install it:
Wget http://mirrors.ustc.edu.cn/gnu/
1. Check the current version information:Bash-versionecho $BASH _version2, hit 4.3 version of the patch under the TMP directory (for insurance purposes, space at least 100M) create a new bash_upgrade.sh file, and write the following: wget http ://ftp.gnu.org/gnu/bash/bash-4.3.tar.gztar zxf bash-4.3.tar.gz; CD
Total 5th article
Before we talked about if. This time we'll talk about another alternative structure--case. Case and if
If the condition is used for selection, not a lot of circumstances, if the choice of conditions too much, a series of If,elif, is also drunk. Yes, the case in bash is the same as the switch's position in C. But the usage can be very different. code block
Any language has the concept of a block of code, the curly braces in C language
Respect for the original works, Ming: This post for the excellent post integration
One, meaning
#!/bin/sh refers to this script using/bin/sh to interpret execution, #! is a special notation, followed by the path to the shell that interprets the script.
In fact, the first sentence of the #! is the Interpreter program path to the script, the content of the script is interpreted by the interpreter, we can use a variety of interpreters to write the corresponding script.
For example,/bin/csh scripts,
Tags: bash first knowledge1.Linux System Terminal OverviewServer Terminal switch: Ctrl + Alt + F1 ... F6Virtual Machine Terminal switch: Ctrl +shift +alt +f1 ... F6The virtual terminal is generated by the mingetty program//物理机执行为本地终端[[emailprotected] ~]# tty/dev/tty1//通过网络使用模拟终端远程连接Linux, 日常运维中就是这种方式。[[emailprotected] ~]# tty/dev/pts/12.Linux System Bash ManagementIn a nutshell, the shell is the user interf
Bash Vulnerability Detection Methods
You can run the following command to check whether the system has this vulnerability (running in the local Bash environment ):Shell 1, CVE-2014-6271, Test method:Env x = '() {:;}; echo vulnerable' bash-c "echo this is a test"If the execution result is as follows, the vulnerability exists:VulnerableThis is a testAfter the shell
BashIs the default shell script of the Linux operating system. Shell is a program used to process operating system and user interaction. Shell scripts can help users automate interaction with the operating system. You can also understand it as a script-based programming. Now that programming is available, the compiler, interpreter, and debugger of the program are essential, and bash is the same. However, there may be something different from the progr
First bash, although there are if_else, can tune the system commands. But many limitations, such as not supporting multi-threading, have no libraries. So it's not necessary for PY or Ruby to learn bash again.
Reply content:Daily work, a lot of things are very trivial and detailed, you can not imagine you will encounter any specific small task.
At this point, you can't always open vim and write a Python scri
From: http://www.linuxdiyf.com/viewarticle.php? Id = 105505
I bet you are reading this article. more than 99% of the possibility is that you are wrong about this problem, or at least there is a deviation.I believe that this is a broad mistake in the Education Law, that is, to tell everyone:If [condition]Then...FiThis is the "Syntax" of the Condition Statement in bash ".Anyone, or almost anyone, will naturally think that [and] are part of this syntax s
# # # Yesterday also said the legend to another patch, today is all out. The basic operation is consistent with the test results are different. continue to fix bash vulnerabilities for the Debian7 wheezy version number, such as the following:1, test whether the need to upgrade# env x= ' () {:;}; Echo vulnerable ' bash-c "echo this is a test" #显演示样例如以下, upgrade requiredVulnerableThis is a test2. Offline upgr
Bash-shell Startup File Linux uses environment variables to identify itself in programs and scripts. This provides a simple way for your program to obtain system information. The question is how to set these variables. When you log on to Linux and start a bash shell, bash searches for and runs commands in several files by default. These files are called Startup f
1. Initial knowledge of Bash Start by compiling a simple bashVim Hello. SHUsing Vim to edit hello.sh, enter the following code and Save:#!/bin/bashecho Hello WordHow to run the Bash script:sh hello. SH # Use Bash to execute bash hello. SHYou can also have executable permissions on the script itself, which chmod can
Note that if the user's shell is/bin/sh, it needs to be modified to/bin/bash!! Usermod-s/bin/bash User NameKali Linux System corresponding configuration file is/ETC/BASH.BASHRC, different release version may be differentStep one: VI/ETC/BASHRC added as follows:histfilesize=2000histsize=2000histtimeformat= "%y%m%d-%h%m%s:"Export Histtimeformat#export prompt_command= ' {command=$ (History 1 | {read x y; echo
Original address: http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/
-----------------
BASH Shell:change The Color of my Shell Prompt Under Linux or UNIX by VIVEK Gite on October 6, 2006
How does I change the color of my shell prompt under Linux or Unix operating systems?Can change the color of your shell prompt to impress your friend or to make your own life q
Perfect Bash History Audit
1. Download the bash-4.2 version source package, modify the source code to recompile the installation:
wget http://mirrors.ustc.edu.cn/gnu/bash/bash-4.2.tar.gz
2. Modify the Config-top.h file in the root directory of the source package.
#define SSH_SOURCE_BASHRC#define Syslog_history
Rem
Many people use shell scripts to accomplish simple tasks and become part of their lives. Unfortunately, shell scripts can have a very large impact when they run an exception. It is necessary to minimize this type of problem when writing scripts. In this article I'll introduce some of the techniques that make bash scripts robust.
Using Set-u
How many times have you crashed a script because you didn't initialize the variable? For me, many times.
Tags: max ISS ror span post img In addition to debug echoLinux Shell Bash with special meaning exit code purpose descriptionThe exit command exits the current shell and can terminate the current script execution in a shell script.Common parametersFormat: Exit nExit. Set the exit code to N. (cause the Shell to exit with a status of N.)Format: ExitExit. The exit code is unchanged, which is the exit code for the last command. (If n is omitted, the exit s
Bash remote arbitrary code execution Security Vulnerability (most serious vulnerability)
US-CERT is aware that Bash has a security vulnerability that directly affects Unix-based systems (such as Linux and OS X ). This vulnerability causes remote attackers to execute arbitrary code on the affected system.
US-CERT recommends that users and administrators review this RedHat security blog. For more details, r
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.