Because spark-1.3 as a milestone release, add a lot of features, so, it is necessary to study a, spark-1.3 need to scala-2.10.x version support, and the system on the default Scala version of 2.9, need to upgrade, You can refer to Ubuntu to install
(1) under the shell, operate the Hadoop directory, batch name or delete, the final command sed the regular greedy replacement, look at the following script:Java code
# traverse the file name under the Hadoop directory
for line in ' Hadoop
Recently the leader has given a task to deal with the line-piece server, unwanted pictures to remove it.Idea: First the line to use the image from the database to export, the table has a picture path, and then the path to generate a txtFinally, each
There are many shell types in Linux, common: Bourne shell (/user/bin/sh or/bin/sh),Bourne Again Shell (/user/bin/bash or/bin/bash),C Shell (/user/bin/csh or/BIN/CSH),TC Shell ((/user/bin/tcsh or/BIN/TCSH).The Bourne shell (i.e. sh) is the first
Use the read command when you need to get input from the scripting people during the execution(1) Basic readingThe read command accepts standard input or other file descriptor input. After reading the data into a standard variable.- p allows you to
The format of the IF in the shell:If [conditions]ThenExprelif [conditions]ThenExprElseFi[Conditions] includes1.!,-A,-o2.-n,-z, =,!=3.-eq,-ge,-gt,-le,-lt,-ne4.-ef,-nt,-ot5.-b,-c,-d,-e,-f,-g,-g,-h,-k,-l,-o,-p,-r,-s,-s,-t,-u,-w,-xType 1 is a logical
I. What is a shell? 4.shell provides a way for you to communicate with the operating system. There are two kinds: a.Interactive mode:(Input from the keyboard and can be immediately responded to) in fact, one command is entered at a time;B.
According to company requirements, delete the server 30 days before the file, the following is the script:#vi del-30.sh#!/bin/bashlocation= "/mpgdata/"Find $location-type f-mtime +30-exec rm-f {} \;#chmod +x del-30.shDescription:/mpgdata/is the path
Remember that if and the [] are whitespace1. String judgmentSTR1 = str2 When two strings have the same content, length is trueStr1! = str2 True when string str1 and str2 are not equal-N str1 True when the length of the string is greater than 0
Linux shell& Environment variableswhen you log on to the system, a user shell is started. In this shell, you can use a shell command or declare a variable, or you can create and run a shell script program. When you run a shell script, the system
Linux shell $$, $#, #!, $*, $, [email protected], $-, $0~$9 meaning$$Shell itself PID (process ID)#*All parameter lists. such as "$*" in the Case of "" ", in the form of" $ $ ... $n "output all parameters.[Email protected]All parameter lists. such
First, Introduction:HBase shell using the process, using the CRT client, the command input can not be deleted has been trapped around me, today finally unbearable, a few degrees Niang, Google, finally have a solution, special share to
The execution name of this program$n the nth parameter value of this program, n=1..9$* all parameters of this program, this option can have more than 9 parameters.$# the number of parameters for this program$$ the PID of this program (the current
In the process of learning the algorithm, we will inevitably touch many and sort-related algorithms. All in all, the basic sorting algorithm must be mastered for any programmer.Starting today, we're going to be explaining the basic sorting algorithm.
At work, there are times when you need to process some data, use Java to compare aspects, such as hbase, but you need to execute it in the shell, so the extra bag is harder to get into, and it's easy to package with Maven.
First Pop.xml
Shell scripts that execute system commands and write output to log files
This is probably the requirement. Run the usysfault command on the aix system to retrieve the fault light information. However, it seems that only the root user can execute
Return values of functions in Shell#! /Bin/shSum (){Echo $($1 + $2 ))Return $($1-$2 ))}Sum $1 $2C =$ (sum $1 $2)Echo $?Echo $ cRun the command:./bashTest 11 1.The running result is:12 -- result of sum $1 $210 -- echo $? Because the return value is 10
Shell Escape Character collation
Escape: place the backslash (\) before the character to be escaped, indicating that the character should be considered as a common character.
When sed awk is used, escape characters are occasionally used.
For
Shell script Learning1111111111111 clear the simple command script of the messages log file under/var/log/Var/log/the system file under the log file must have the root permission:$ UID is the global variable of the system:Make & make install
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