This is the code development style, in fact, is a function name, equivalent to the underscore division, but read into the package name after the meaning of different. This is defined in accordance with Google's shell development
Original 52779364The problem with script development is that the string splitting operation in the original Java (substring indexof, etc.) does not know what to do (e.g./a/b/c/d.txt I want to know the name of the file)Query information that the
1,$$: Displays the current process ID number[Email protected]:~/linux/shell/how_to_use_var$CatShow_pid.SH #!/bin/BashEcho $$Sleep the[email protected]:~/linux/shell/how_to_use_var$ bash show_pid.SH&[1]9401[email
Export Feature Description: Sets or displays environment variables.syntax:export [-fnp][variable name]=[variable setting value]Additional Note: when executing a program in the shell, the shell provides a set of environment variables. Export can add,
21.1 Why to learn shell programming(1) Linux OPS engineers need to write shell programs for server management when managing server clusters.(2) for Java EE and Python programmers, the need for work, your old assembly requires you to write some shell
[TOC]V. Automatic synchronization of files 5.1 configuration scriptsThe core command is to use the Rsync service.[[email protected] sbin]# vim 4.expect#!/usr/bin/expectset passwd "123456"spawn rsync -av [email protected]:/tmp/12.txt /tmp/expect
1. Practice command history, aliases, and special character usages in the shell (4th. 4.2, Section ~4.5)(1) Defining aliasesThe definition of an alias is that it is often enclosed in single quotation marks to prevent the shell from ambiguity about
[TOC]Distribution System-expect What is a distribution system?
Now some of the larger enterprises, most of the use of load balancing, and sometimes because some programs to change, or some bug to modify, if only a few servers, it is very
Shell Introduction
The shell is a command interpreter that provides interaction between the user and the machine
Support for specific grammars, such as logical judgments, loops
Each user can have their own specific shell
CentOS7
Variable
Variables are abstract concepts that can store calculated results or can represent values. Variables can be accessed by variable names.
Variable declarationDeclaring variables is generally used in the following
1:hbase start hbase Shell Run command class path contains multiple slf4j Bindings. Error, because the jar package conflicts, so for the jar package with Hadoop, you can delete the other jar package, if you are not sure whether the deletion is
In the previous command Ls/var then in this command LS is the command keyword,/var is the parameter. So how do we do parameter passing when we're making a shell script ourselves?In bash, the first parameter is automatically placed in $ $, the second
Recently a new deployment of the gateway, the user in the implementation of the HBase Shell mode connection HBase, error[[email protected] lib]$ hbase shellslf4j: class path contains Multiple slf4j bindings.
1. string Judgments
STR1 = str2
True when two strings have the same content, length
Str1! = str2
True when strings str1 and str2 are unequal
-N str1
True when the length of a string is
One, parenthesis, parentheses ()1, single parenthesis ()?? ① Command Group. The commands in parentheses will run in a new sub-shell sequence. So the variables in parentheses cannot be used by the rest of the script. Multiple commands in parentheses
Introductory ArticleLinux, we generally use the command line to operate, a good-looking command line, can make our work comfortable, this tutorial can be made to complete the command line style:Of course, you can change the more cool command-line
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.