1. Write a script that calculates the factorial of 10 using a loop #!/bin/shFactorial=1For a in ' SEQ 1 10 'Dofactorial= ' expr $factorial \* $a 'Doneecho "10! = $factorial "2. Write a script, after the execution, print a line prompt "Please input a
ShellApplication TipsTips:1, command completion function: Key2, clear screen:ctrl+l3. Delete all contents before cursor:ctrl+u4. Command history: HistoricalThen:! History The command label listed, you can execute that command. Such as:! 188Also:
Method One:Modify the/etc/sysconfig/i18n fileChange the lang= "en_US" inside to GB2312.To restart the machine.Without restarting the method, directly# lang= "GB2312"And then we can.Modify i18n just to restart the activeMethod Two:#vi
Bash environment variables have arbitrary code execution vulnerability: "Using CGI requests can cause remote code execution, which in turn leads to server intrusion, causing serious harm,Patches officially announced are also
#!/bin/bash#./zabbixagent.sh 172.16.103.16 172.16.103.134#$1 master address, $2 local_listen_ip groupadd zabbix && useradd zabbix -g zabbixcat >>/etc/services
This article is from the "muzinan technical blog" and is not reposted!
Zabbix
Recently, I sent a peid shell check tool to everyone. Maybe the newbie doesn't know what this is.Let's take a look at its usage.Peid is now the most popular shell check tool. The so-called "shell" is to put a "shield" on the program, which can be
When writing shell scripts, brackets and brackets are often used. I. Parentheses, Parentheses () 1. Single parentheses. ① Command Group. The commands in parentheses will open a new sub-shell for sequential execution, so the variables in parentheses
Shell operation command:
HDFS path, defined in core-site.xml
fs. Default. Name
HDFS: // master. hadoop: 9000 master. hadoop namenode Host Name
Use/to replace the current absolute path
Hadoop FS-ls/View content in the root directory of
Awk
Awk is a programming language used to process text and data in Linux/Unix.
SedSed is a stream editor that is a very useful tool in text processing.
GrepGrep is a powerful text search tool, which is often used in combination with pipelines.
There are many blank lines after extracting the log files to be viewed recently, which is not conducive to the comparison of previous files. In order to be backward compatible, only empty lines can be deleted when obtained. I googled myself and used
General Operation
View Server Status
status
View hbase version
version
DDL operations
Create a table
create ‘member‘,‘member_id‘,‘address‘,‘info‘
Three columns are created: member_id, address, and info.
Knowledge Point Review:Cf is a part of the
1. Define Variables
1) when defining a variable, the variable name does not contain the dollar sign ($), for example:Var = "Hello World"2) Note that there is no space between the variable name and equal sign, which may be different from all
By long Luo
Recently
Weather ForecastProject, you need to download some weather icons from Yahoo, but because there are many icons, there are more than 80. Icons are stored on the Yahoo image website.
Thunder does not support HTTPS download.
Shell upgrade,/bin/bash versions 4.1 to 4.3
Bash environment variables have arbitrary code execution vulnerability: "Using CGI requests can cause remote code execution, which in turn leads to server intrusion, causing serious harm,Patches officially
Linux shell redirection and shell redirection
Redirects the shell error output to the standard output to record the error information of the script.
For example:
/Root/test. sh> test. log 2> & 1
Note:
Linux first loads/etc/rc. d/rc. local
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