No hurry, step-up, first lay a good foundationThe Spark Shell principle First, we clearly locate the few.1, Spark-shell2, Spark-submit3, Spark-class4, Sparksubmit.scala5, Sparkiloop.scalaSource Code of InitializesparkDef Initializespark () {
1. Man helps explain commands you are familiar with or unfamiliar with
Eg:man ls to view LS-related usage
Note: Press the Q key or CTRL + C to exit, under Linux you can use CTRL + C to terminate the current program run.
2. LS to view the
Linux Classic Shell command collation1. Delete a 0-byte fileFind-type f-size 0-exec rm-rf {} \;2. View the processSort by memory from large to smallPS-E-O "%c:%p:%z:%a" |sort-k5-nr3. By CPU utilization from large to small arrangementPS-E-O "%c:%p:%z:
TopicsSourcehttp://acm.hdu.edu.cn/showproblem.php?pid=5730DescriptionPerhaps the sea ' s definition of a shell is the pearl. However, in my view, a shell necklace with n beautiful shells contains the most sincere feeling for my best lover Arrietty ,
Shell programming is designed to simplify management operations。1、base variable and variable classificationbase is the standard shell for Linux。Base VariableSet:querying all environment variables under the systemEnv: view environment variables under
The first thing to know is how to play color ball: 6 red balls (1~33) and a Blue ball (1~16) to choose a so-called 6+1To generate 6 random numbers between 1~33 and cannot be equal, this is key if you use traditional judging methods (the first with
Analysis: Randomly generate 10 numbers? Generate a random number, here with the random function, I define the generated 10 numbers as an array of arrays, the initial value of the definition max is array[0] use for loop to compare with each element's
This article is part of the Linux Shell Series tutorial (17), more Linux shell tutorials: Linux Shell Tutorials
Through file inclusion, you can reference the contents of other files, or you can separate complex content to make the program
1. Shell program Exercise: Create a Dir folder and create a cd.c file in the Dir folderFirst VIM hello.sh2. Variable definitions and references in the shell(1) Definition and initialization of variables. A shell is a weakly typed language (a
To use a good bash shell, first of all to understand the bash shell environment configuration, only the configuration, we will be handy, to configure, we must understand the type of bash configuration file, and then according to the actual needs to
Shell variables: Local variables and environment variablesBasic elements:#! /bin/bash#VariableProcess ControlHome: The current user's home directoryPath: The current user's executable file search pathLANG: The default language the program should
Special usage One whileSyntax Formatwhile read line; DoLoop bodyDone Function: Reads each row in the/path/from/soemfile file sequentially and assigns this line to the line variableExample: Scan a/etc/passwd file for each row, if the Discovery gecos
(1) Manipulating a file and slicing the file query rows grep ' XXX ' Cut 2 (or 1-2)(2) The operation of the file to remove the weight and show the number of repetitionsgrep ' xxx ' Cut 2 Sort Uniq -C(3) View total number of totals rowsgrep ' XXX '
"Shell script" line-by-row processing of text filesThe style files are often processed on a line-by-row basis, how to get each row of data in the shell, then process the row data, and finally read the next row of data, loop processing. There are
There are two types of arrays in bash: normal arrays and associative arrays. An ordinary array can use integer values only as an array index, and associative arrays may use strings as indexes.1.7.1 Normal ArrayDefine an array in one way:[Email
1. See the script for details#!/bin/bash# declaring an array declare -a test#j=0#cat > test.file 2. Implementation results[[Email protected] ~]# sh a.sh 1 2 3 4 5one A-print all of the array elements12345another A-to-print all of the ARR Ay elements1
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.