Shell script variable What is a variableReplace another complex or volatile data with a simple "word"Display and setting of variables: The display of Echo,unset variables Echo ${path}Setting rules for variablesequal sign Connection variable =
variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special meanings, and such variables are called special variables.
List of special variables
First, declaring variablesMyurl= "http://see.xidian.edu.cn/cpp/linux/"mynum=100Attention:There can be no spaces between the variable name and the equals sign, which may be different from any programming language you are familiar with.At the same
&& (and) with the || (OR) with the ; (and)A semicolon has just been mentioned above for the delimiter between multiple commands. There are also two special symbols that can be used in the middle of multiple commands, that is, "&&" and "| |" are all
1. Create 100 folders in the/home folder. The folder name is a1......a100 in turn.2. Write a script. Own initiative will be under the Household folder under all files less than 5KB package into XX.tar.gz. (Hint: use LS. Grep,find and other orders.
Spark 1.4 was downloaded and the following error was encountered while executing Spark-shell:
Java.net.unknownhostexception:ukon-m-q0ep:ukon-m-q0ep:nodename nor servname provided, or not knownAt Java.net.InetAddress.getLocalHost
Find FilesFind./-type FFind a DirectoryFind./-type DFind a file or directory with the name testFind./-name TestLook for a file whose name matches the regular expression, and note the preceding '. * ' (found file with directory)Find./-regex.
Shell Test CommandThe test command in the shell is used to check if a condition is true, and it can be tested in three aspects of numeric, character, and file.Numerical test
Parameters
Description
-eq
Equals
Interactive shell and non-interactive shell,login shell and non-login shell. First, this is divided into two different dimensions, one is interactive, and the other is whether to log in or not. .
The interactive mode is where the shell waits
Here are some of the two major points to know. The following is the point:First, hardware, core, and Shell.1. Hardware: Of course, your hardware is equipped.2. Core management: The core of the operating system.3. Application: Graphical interface
What is a regularA regular is a way to describe a character or string by combining symbols with special meanings, called regular Expressions . Or, the regular is the rule used to describe a class of things.in Linux, wildcards are interpreted by the
What is a regular A regular is a way to describe a character or string by combining symbols with special meanings, called regular expressions. Or, the regular is the rule used to describe a class of things.There are regular things in life:For
Bo main name: Li ChangmingPost Address: http://keep88.blog.51cto.comThis note is from the old boy books: Learn Linux OPS Shell programming with old boysThe advanced and practice of shell variable knowledge1. Special positional parameter variables in
14.2 Read user input14.2.1 variableIn the previous chapter we talked about how to define or cancel a variable, which can be set to the current shell's local variable, or to an environment variable. If your shell script does not need to invoke other
A Tetris that was written on the web with a Linux shell script.It's the best shell I've ever seen written. Share a bit.The original author's information is in the gaze of the script.: Click to download#!/bin/bash # Tetris game# 10.21.2003 xhchen
Here is a record of how the shell script can be color-output, using a bit in Python also applies.echo Display in shell script with color display, echo display with color, need to use parameter-EThe format is as follows:Echo-e "\033[word background
---------------------The content of this section:· Spark Conversion RDD Operation Example· Example of the Spark action RDD operation· Resources---------------------Everyone has their own way of learning how to program. For me personally, the best
Java Grayscale ScriptUse scripting considerations:1, the publishing machine needs to be able to resolve the Web server hostname, and configure SSH communication2, the variables in the directory and users and other information needs to create their
One, shell scriptOpen a text editor (you can use the Vi/vim command to create a file), a new file test.sh, the extension sh (sh for Shell), and the extension does not affect script execution#!/bin/bashecho "Hello world!""#!" is a contract tag that
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.