First look at the help command for hive:[[email protected] hive]$ hive-hmissing argument for option:husage:hive-d,--define Va Riable subsitution to the Apply to hive commands. e.g.-D a=b or--define a=b--database Specify the database to Use-e SQL
This article describes the shell script, through a while-do loop, with Ps-ef|grep check whether the loader process is running, if not run, then start to ensure that the crash hangs the process, and automatically restart in a timely manner. The
[Condition 1-a Condition 2] When 1 and 2 are true [condition 1-o condition 2] when 1 and 2 one is true [! condition] Take counter && and | | Or! unsigned [-D name] && Echo ' is dir ' is true when the name is directory, then the input has the
A related knowledge 1) By default, the standard input is the keyboard, but it can also come from a file or pipe (pipe |). 2) By default, the standard output is terminal (terminal), but can also be redirected to a file, pipe, or post quotation mark
The program must start with the following line (must be in the first line of the file):
#!/bin/shThe symbol #! is used to tell the system that the parameter behind it is the program used to execute the file. In this example we use/BIN/SH to
Shell script (i)1. Common Commands(1) System Management#useradd, a user group with the same user name is created by default when a new user is added#创建用户user1 and specify a UID of 1111, the owning group is 2222 (test), and the home directory is not
Shell Script (ii)#find查找文件 to find based on time, name, UID, GID, permissions, size, etc.A file or directory accessed within #-amin-10:10 minutes; a file or directory accessed +10:10 minutes ago. The time unit is minutes.#查找10分钟之前30分钟之内访问过的文件或目录Find/
Bash Shell usage notesThe use of the shell is profound, I comb the basic knowledge, tidy up a simple usage, the specific requirements for self-study.1. calculation # echo $ ((1+2)) 3# echo $ ((1+2+3)) 6# echo 3+2+5 |bc102. If usage if [ $i -eq 0
Find DocumentsIt is quite convenient to find text in the grep program (matching text matching). There are traditionally three programs that can be used to find entire text files.
grep's oldest text-matching program. The simplest way is to
today accidentally hit the home directory Delete command, although finally for a variety of reasons did not delete, but the home directory, many files and directories are deleted, and the command line does not display the current user and path.
ShellThe shell is a weakly typed programming language.Distinction between strong and weak:Strong: Variables must be declared prior to use, and even require initialWeak: Variables are declared when they are used, even the part is differentiated by
$0: The current script has a file name of $num:num 1-based number,$ $ is the first argument, and $ is the second argument, and ${is thetenth argument $#: The number of arguments passed in the script $* : All positional parameters (as a single string)
This script parses the log of the Nginx load balancer:#!/bin/bashif [ $# -eq 0 ]; then echo "Error:please specify logfile. " EXIT0ELSELOG=$1FIIF[!-F$1] ; then echo "Sorry,sir. i cat ' T find this apache log file, pls try again! " exit 0
1. ValueFormat:Test "NUM1" OPR "num2"["Num1" OPR "num2"]OPR Value:Equality:-EQUnequal:-neGreater than:-GTLess than:-lt "L is the lowercase letter L"Less than equals:-leGreater than or equal to:-ge2. StringFormat:[Str1 OPR str2][OPR str]OPR
Default variable for Shell script ($ ...)We know that directives can have options and parameters, such as Ls-la to see all properties and permissions that contain hidden files. So can shell script have parameters behind the script file name? It's
Today I learned to write a shell script, a little excited, hereby recorded (actually not difficult to write it)Reason:Now do the projects that require multiple engineering dependencies, but the trouble is that there is no automatic association of
1. #注释作用, #! Except in addition, in the parameter replacement echo ${path#*:} here does not represent the comment, the numeral conversion, does not represent the comment echo $ ((2#101011)) 2. Command line delimiter, you can write multiple commands
In Linux, the shell variable $ #, $ @, $0, $1, $2 has the following meanings :,
Variable description:
$ PID (ProcessID) of Shell itself $! PID of the background Process last run by Shell $? End code of the last command (Return Value) $-Flag list
Centos shell command line only show-bash-4.1 # do not show the user and path solution,Zookeeper accidentally called the home Directory deletion command today. Although it was not deleted for various reasons, many files and directories in the home
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