Shell Programming Overview and variables

Dynamic language: Interpreted language, is a weak type of language, Characteristics: Edge interpretation edge execution. Example: PHP, SHELL, Python, PerlWeak: variable time declaration, or even type-insensitive.Strong: Variables must be declared

Spark-shell Study Notes

1.Val lines=sc.textfile ("hdfs://") = = Loaded comes in as an rdd resilient distributed dataset elastic data setVal Errors=lines.filter (_.startswith ("ERROR")) # #transformationVal errors.persist () # #缓存RDDVal Mysql_error=errors.filter (_.contains

Shell script, a classic topic.

[Email protected] wyb]#CatZhuijiu.SH #!/bin/bash#1, write a script execution, enter a name, generate a random number 01-the number between 99. #2, if the same name repeated input, the captured number is the result of the first crawl, #3, the number

First knowledge of the shell

1. What is a shell?The shell is in the outer layer of the kernel, which is responsible for receiving commands entered by the user, interprets the commands as kernel can understand, then executes by kernel and returns the results back to the default

Linux shell switching

View System available Shell types: (typically bash shell)? ~ Chsh-l/bin/sh/bin/bash/sbin/nologin/bin/Dash/bin/zshTo modify the current shell:[[email protected] ~]# Chsh-l/bin/sh/bin/bash/sbin/nologin/bin/Dash /bin/~ for root. New Shell [/bin/bash]:/

Variables of Shell programming

Variable:A variable is made up of letters, numbers, and _, and cannot begin with a numberLength cannot exceed 255 charactersIn bash, the default type of a variable is a string typeVariable classification:1, user-defined variables: only in the

Mu class Network Shell real-combat notes

Shell Footstep Source code:[Email protected]_ecs imooc_shell]$ lscheck_http_log.sh check_nginxserver.sh master_control.sh system_info.shMaster_control.sh: The main control footsteps, other footsteps this script calls##################################

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

How the shell generates RPM package warehouse list file comparison results

Basic steps:1. Switch to the warehouse directory Rpm_list_dir1 and RPM_LIST_DIR22. LS lists the RPM package files of the warehouse and redirects them to the output files Rpm_list_file1 and Rpm_list_file2 respectively.3. Output the comparison results

Shell 2 Tetris

      declare -i noar= (1 1 1 1); Br= (1 1 1  1 1 1 1 1 1 1    1 0 0 0 0 0  0 0 0 1    1 0 0 0 0 0 0 0 0  1    1 2 0 0 0 0 0 0 0 1     1 0 3 0 0 0 0 0 0 1    1 0  0 4 4 5 0 0 0 1    1 0 0 0 0  0 0 0 0 1    1 1 1 1 1 1 1 1  1 1) echo  "[][]|" echo  " 

9. Shell Environment

• printenv– Print Some or all of the environment variables• set– set shell options• export-Export the environment variables so that the program that is executed later knows.• alias– create command aliases1.shell Environment: The shell maintains a

Parentheses and instances in a shell script

1, single parenthesis and double parenthesisThe double parenthesis command allows advanced mathematical expressions to be put into a comparison. The format is as follows:((expression))In addition to the standard mathematical operators used by the

The meaning of the shell script's own variable

The file name of the shell itself $1~ $n Each parameter value added to the shell. $ $ is the 1th parameter, and the $ = is the 2nd parameter ... $$ the shell itself PID (ProcessID) $! PID of the Shell's last running background process $?

Shell script Programming--case statements

What I'm sharing for you is how to use case statements to write some scripts that you choose to execute. Case statements are mainly adapted for use in some complex selection of scripts, if we use if multi-branch statements can also be written out,

Shell Learning notes-the first day

1. The first line of the program specifies the program that executes the shell  #!/bin/sh #! is used to tell the system that the parameter behind it is the program used to execute the file2. Output information in the consoleecho "Hello

Getting Started with shell scripts--Symbol Chapter

Shell The shell is a command-line interpreter whose function is to interpret the command that executes the user, and the user enters a command that the shell interprets to execute, which is called Interactive (Interactive). The shell

"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

Simple application of shell arrays

1. [email protected] seripts]# cat array.sh2. #!/bin/sh3. zhang= (4. wujiangping5. Shuzhaoqiang6. Renhepeng7. peijiaying8. zhangyiling9. ). for (i=0; iOne by one . Do. echo "This was num $i, then name is ${zhang[$i]}".

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

Shell Script---Array

Array definition: The so-called array, is the same data type of elements in a certain order of the set, that is, the finite type of the same variable with a name command, that is, these variables are defined as a group, they do not have their own

Total Pages: 541 1 .... 411 412 413 414 415 .... 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.