When to use the shell
Because the shell appears to be a common feature between UNIX systems, and has been standardized by POSIX. As a result, the shell script can be applied to many systems as long as it is written "attentively". Therefore, the
The EXEC function under Linux is not a single function, but a function group, respectively:
int execl (const char *path, const char *arg, ...);
int EXECLP (const char *file, const char *arg, ...);
int execle (const char *path, const char *arg, ...,
A key to start the cluster shell script, including HDFs HA + yarn related to all the programs, fbi00x is the host name for your reference:
#!/bin/bash echo "-------------------------Step1----------------------------" echo "now,starting zookeeper.
Iterating and traversing the lines, words, and characters in a file is a very common operation when you are working on a text file. Using a simple loop for iterations, plus a redirection from stdin or files, is the basic way to iterate through the
In fact, it has been written before, but only to achieve the automatic creation of CA certificates and other documents, the recent time is quite well-off, plus the use of this dongdong almost ubiquitous, and therefore, on its basis to do some
What is a shell script. First, it is a script and cannot be used as a formal programming language. Because it's running in the shell of Linux, it's called a shell script. To be blunt, a shell script is a collection of commands. For example, I want
1, for: Read different variable values, execute the same set of commands one by one, until the value is complete exit, variable values are separated by a spaceGrammar:For variable value in value listDoCommand sequenceDone2, while: Repeated testing a
Theoretical part:The loop means that the program executes some statements repeatedly;Whiler loop is a kind of cyclic structure, when it is not known in advance how many times the loop executes, it is necessary to use the while loop; while the
Create a scriptThere are many different shells in Linux, but usually we use Bash (Bourne again shell) for Shell programming because bash is free and easy to use. So the script I've provided in this article is all about using bash (but in most cases
Reprinted from: http://dos2unix.cn/link/4801. Standard input stdin file descriptor is 0, standard output stdout file descriptor is 1, standard error stderr file descriptor is 22./dev/null empty equipment, equivalent to garbage bin3. REDIRECT Symbol:>
2.2.1, Shell Introduction
(1) Shell can be understood as a software system to provide user operation of the command line interface, it can be said that he is a way of human-computer interaction
(2) We can use the shell and the operating
For example, comparing strings, judging whether the file exists and whether it is readable, etc., usually uses "[]" to represent the condition test.Note: The space here is important. The space to ensure the square brackets. I have wasted a lot of
The purpose of this paper is to review 3 kinds of IF statements and case multi-branch structure statements that the shell implements for branching, and to supplement the execution efficiency of if and case.Knowledge Reserve
The
In the shell of Linux, echo changes the output display style echo-e "\033[32;49;1m [done] \033[39;49;0m" or echo-e "\e[32;49;1m [done] \033[39;49;0m"Output result: [Done]The color of the text terminal can be generated by using the ANSI
The Unix command obtains input from the standard input device (stdin) By default, outputting the result to the standard output device (STDOUT) display. In general, the standard input device is the keyboard, the standard output device is the terminal,
2011-09-27 22:11:51| Category: rhel5_033| Report | Font size Subscription Linux uses Prompt_command to realize audit functionThis system audits, records what the user, at what time, did what operation. The information is then recorded in a
This article records my common or useful system-level commands under the Linux system, including hardware and software view, modify commands, CPU, memory, hard disk, network, System management and other commands. However, this article does not
Rundll32 contains many system commands. The following is a collection of commands that rundll32 can execute.
To bring up the "format-3 1/2 floppy (A :)" window:Rundll32.exe shell32.dll, shformatdrive
To bring up the control panel "date/time
Shell
Shell is a program with special functions. It is an interface between the user and the core program (kernel) of the Unix/Linux operating system. Why do we say shell is an intermediary between the core program of the system and the user?
Linux shell Escape Character metacharacter wildcard special character summary, shell escape1. linux shell wildcard (wildcard)
Wildcards are processed by shell (not by the command statements involved, but we have not found any introduction to these
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