1. What is shell?
In fact, I have heard of shell before I came into contact with Linux. At that time, I was talking about shell programming and I knew nothing about it. But surprisingly, I remember this term when my memory is really bad. Okay, let's talk nonsense. In the previous article(1) Linux?Ubuntu or centos? Linux Installation. Computer users communicate with the kernel through the interface (shell, Kde, etc.) to control
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
function name. The previously defined function can be called directly using hello. For a function with parameters, you only need to give the parameters following the function name in sequence, for example, func_name arg1 arg2.
Function Parameters
When a function is called, parameters can be passed to the function. How can we obtain these parameters in the function body? Function parameters are obtained by $1, $2, and so on. For example:
Function add (){N = $1M = $2Echo $ (n + M ))}
Call Add 1
Introduction to Shell Script (bash)
As is known to all, Unix is famous for its gadgets, using a number of simple gadgets to accomplish a job that would otherwise require a lot of software development, making UNIX the ideal system platform for many people.
In many gadgets, Shell script is the most basic, powerful, and most widely used. It uses a wide range, not only from system start-up, program compiling, regular operation, Internet connection, even
Bash should be the most popular shell scripting interpreter on Linux today (and a shell called dash, I hate this stuff too much.) As long as you work on Linux and want to work more happily, you should be familiar with the most basic bash programming, because it will give you enough happiness to work. This article will summarize some of my own usual bash basic pro
commands: Env-i x= ' () {(a) => ' bash-c ' echo date '; Cat Echo
Before fixing, the current system time is displayed, which indicates that the server has not been repaired, please fix it in time, the following is attached the Linux system repair program, including: CentOS and Ubuntu System final repair program.
First, CentOS final fix Bash vulnerability scenario
In the Server command box, type the fol
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
recall that we talked about user management, rights management, and also introduced two commands, one is the install command, the other is mktemp, here we do not do more introduction.For user management, it is the allocation of the resources of the permission to their isolation.For permissions, it is the permissions that the logged-on user of the system should have assigned to the resource.So we'll cover the bash feature and the initial programming of
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
Bash security vulnerabilities are more serious than heartbleed attacks.
RedHat finds a computer software system vulnerability named Shellshock (or Bash Bug), which is no less serious than the "heartbleed" vulnerability in OpenSSL software. It is estimated that this vulnerability may affect the normal operation of more than 50 thousand
Historical number of the current command after shell is activated.
\ $
Displays a $ symbol. if the current user is root, it displays the # symbol.
\\\\
Display a backslash \\
\ D
Show current date
\ H
Displays the host name of the computer that runs the shell.
\ N
Print a line break.
\ S
Display the name of the running Shell
\ T
Show current time
\ U
Displays the user name of the current user.
\ W
Displays the reference name of the current working di
appends string after the N command and executes it.^ Old ^ new ^ replace the previous commandModify
: S/old/new/replace the new that appears for the first time in the N-th command with old. For example, vim !? Test. cpp? : S/cpp/c/: Gs/old/new/replace all: Wn w is a number, and the w parameter of the command is used.: P echo command instead of execution, such! Ls: p. This is very useful. You can check whether the command you selected is correct and use it again when you want to execute it !!
. But this does not mean that, like other users on the network can get control of the computer, although the hacker exploited the vulnerability does not have control rights, but it is easy to leak computer-related information, so as to facilitate the hacker attack, so the vulnerability is still very dangerous. However, as long as it is a shell loophole, it is very dangerous. Shell as a bridge between human
-W to show only the number of words in the fileXi. Input/Output redirectionWhen using a computer, the body that implements a function is a programprogram = instruction + dataThe data is criticalEntities that can complete input and output functions in a Linux system: fileDevices that can be used for input: FilesKeyboard equipment, file system of the regular files, network card equipment, sound card equipment, disk equipment, etc.;Devices that can be u
BASH includes: setting variables and using the bash operating environment to build a data stream redirection function pipeline command bash command line is indispensable for host maintenance and management help 1.1 understand bash, shell, which manages computer hardware is a
Basis
Learn the basics of Bash. Specifically, enter man bash and browse at least the full text; it's simple and not long. Other shells may work well, but Bash is powerful and available in almost all cases (learning Zsh,fish or other shells is handy on your own computer, but in many cases it restricts you, such as
1. What is Shellscriptshellscript is to use the shell's function to write a "program", the program is to use a plain text file, some shell syntax and commands (including external commands) written inside, with regular expressions, Pipeline command and data flow redirection, conditional judgment statements and other functions, in order to achieve our desired processing purposes. 2. Script or program source files are plain text files. 3. The execution of a script or program is generally done in tw
all operations in the computer, responsible for the processing of human interaction, execution of scripts, etc., is the operating system is an important part of the normal operationBASH,ASH,ZSH,TCSH is a concrete implementation of the abstract concept of the shell, which is a program that can generate a process object.If you want to change the shell of the program, you can modify the/etc/passwd, the inside of the/bin/
Bash vulnerabilitySeptember 25, 2014, following the "Blood of the Heart", the oceans from Australia's Bash remote execution vulnerability again shocked the Internet. If the heart drops only by stealing user computer information, and Bash vulnerability allows hackers to remotely control the
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.