Shell Small Script

1#! /bin/Bash2 3j=04 forIinch "[email protected]"5 Do6j=$ (($j +1)) #累加计算7 Echo-E"$j \c"8 Echo$i9 DoneTen One A while[[ $1= -* ]]; Do#匹配-back with any value - Case$1 inch --D) debug=1 ;; the Esac - Shift - Done -action=$1 + Shift

function call path process analysis from Spark-shell to Sparkcontext (source code)

  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 () {

Linux Shell Common directives

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 collation

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:

HDU5730 Shell Necklace (DP + CDQ + FFT)

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 ,

LINUX_10------Linux Shell programming------variables

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

Color Ball of shell scripts

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

Shell script-Backup According to the number of files (reprint)

#!/bin/bash############################### #FileName: Backuplogtimer.SH#Function: Scheduled backup log file #version:0.1#Authon: xueya#date:2014.06. -############################### #获取当前路径path=`pwd`Echo "current1 path: ${path}"#循环执行 while[[1-eq1 ]]

Shell randomly generates 10 numbers to find the maximum value

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

The Linux Shell Series Tutorial (17) Shell file contains

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

(vii) Shell programming learning

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

Shell Test Value string file comparison

A comparison of the numerical values Describe N1–eq N2 As N1–GT N2 Greater than N1–ge N2 Much more than N1–lt N2 Less than N1–le N2 As small as

Linux Foundation--bash Shell Environment configuration

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's underlying syntax

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

Shell Special Usage

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

Linux shell command

(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 files

"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

Shell Script Raiders (learning notes)--1.7 array

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

Shell Array Common operations

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

Case of shell Script Automation deployment XX (with array)

#!/bin/sh#auto make install MFS files#cat > Mfshdd.cfgchown-r mfs:mfs/data/mfs1chown-r Mfs:mfs/data/mfs2}client_mfs () {if [-e/usr/bin/mfsmount];then echo ' This Mfschunkserver already exists,please exit "Exit 0fi#download MFS SOft Version 1.6.27

Total Pages: 541 1 .... 306 307 308 309 310 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.