#!/bin/bash#echo "1.$12.$23.$3"If ["$" = "+"]ThenRes= ' expr $ + $ 'echo ">>the result is: $RES"elif ["$" = "-"]ThenRes= ' expr $-$ 'echo ">>the result is: $RES"
#这里说明下, using "x" instead of "*"
#是因为在命令行输入 *,shell parsing problem,
#* cannot be
When you use a shell to write a program, you sometimes have to confront the problem of interaction--unfortunately, the shell can't automatically complete the interaction. If the interactive content is many, it is convenient to apply expect script
Sometimes we need to repeat the previous commands in Bash. You can certainly use the UP ARROW keys to view the commands you've run before, but this article describes some of the better ways, such as!!,!a,!number,!-number,!$,ctrl+r shortcuts. This
1, view namespace
Hbase>describe_namespace ' Ai_ns '2, List all namespace
Hbase>list_namespace,
3, Create a table under namespace
Hbase>create ' ai_ns:testtable ', ' FM1 '
the management of the table
1 See what tables are available
on the shell:
0 indicates standard input, input data from the terminal, generally refers to the keyboard
1 indicates the standard output, the data displays to the terminal, generally refers to the screen
2 indicates standard error output, Error
Linux Common Commands
LS-F: Catalog will show/
[Root@milab ~]# ls-ifl
total dosage
69199780-rw-------. 1 root root 1496 June 8 2016 anaconda-ks.cfg
77471938 Dr Wxr-xr-x. 2 root 6 September 21:49 svntest/
74325841-rw-r--r--. 1 root root 7
Call volatility in the shell script, the volatility call is normal when the local test, but when the CGI program calls the shell script, there is no result output ... Why
There may be two reasons for the analysis: (1) Permission issues (2) Python
Often to deploy multiple servers above the application, if a machine's login too cumbersome.
All just think about writing a script to deploy different servers
Prerequisites:
Configuring SSH Login Free
If not, please join me in another article http://
Cut-and
The Cut command extracts text columns from a text file or text stream.
Cut syntax
[root@www ~]# cut-d ' delimited character '-f fields
The PATH variable is as follows
[Root@www ~]# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/
Execute the same command on multiple machines on a cluster because of actual development needs. For example, execute a specified script, delete files in the same directory (this is prudent ~ ~) and so on, the members of the group developed a ALLSCP (
Shell Programming
1. Briefly
The format for writing shell scripts using the vi text Editor is fixed, as follows:
#!/bin/bash
#comments
The symbol in the first line #! tells the system that the program that is specified by the following path
Last time I wrote the shell, I found that VI and VIM are different: Vim is the upgrade version of VI, it is not only compatible with all VI directives, but also some new features in it. Vim is much more useful than VI.
This time the last content,
The first step: Download Tomcat 7.0.27 Click the Open link, this is a no-install compression package, decompression can be used.
The second step: Apply for dynamic domain name, you can go here to register a peanut shell account, registered well
This sort looks more difficult than bubbling selection, inserting, and logically complicated.
Intuitively, I know this is not simple, a little afraid.
There is no way to give yourself a hint of psychology, be sure to read the 8 basic sorting
1. Definition of variables
1.1 Variable names can consist of letters, numbers, underscores, but numbers cannot be the first character of a variable name.
1.2 Define the value of the variable by assigning the symbol "=", e.g:
Myname= ' Test ', String
Unlike Java, PHP and other languages, SH's process control is not empty, such as (the following is the PHP Process Control notation):PHP if (Isset ($_get["q"]) { search (q);} Else { // don't do anything }You can't write this in Sh/bash, and
Linux Shell Basics
Terminal printing
#!/bin/bash#The printf of Linux termnal,Include "echo,printf"#author by woon echo "The shell\`s name is $0"#examples of echo,printf#默认打印。输出换行echo "Hello World!" echo ‘Hello World!‘#echo -n参数接受不换行输出echo -n
When you do Flask Web development under Linux, you begin to fully learn to use the sublime editor.Because of the need to shell execute the command under python run.py runserver , it is necessary to be able to invoke the shell execution of 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service