Shell Review---File decompression command

Need to deploy the server itself, so after the application of space, you need to install Linux itself, install Apache, etc., so download the compressed file needs to run. On the internet to find some decompression command wrong, especially try the

A summary of---variables, comparisons, and tests used in shell programming

One, variableEnvironment variables, positional variables, pre-defined variables1. Environment VariablesEnv #查看环境变量2. Position variableVI location.sh#!/bin/bashsum= ' expr + $ 'echo "$ + $ = $SUM"./location #则12为第一个位置变了 $1,32 changed the second

Shell script Programming

1. Write the shell script, calculate 1-100 's and;#!/bin/bashsum=0;for((i=0;i100$sum$i ))}echo$sum2) Write the shell script, ask to enter a number, and then calculate from 1 to the input number and, if the input number is less than 1, then re-enter

Shell Text Word Count

The contents of the Words.txt are as follows:The day is sunny the the the the and the Sunny isCount the occurrences of each word and output in descending order.The Unix pipes script is as follows:Cat TR ' ' ' \ n ' Sort Uniq Sort awk ' {print $, $

Linux shell directives such as-D,-F,-E, and other judgment expressions

Source:http://zhidao.baidu.com/question/322131711.htmlFile comparison Operators-e filename true if filename exists [-e/var/log/syslog]-D filename True if filename is a directory [-d/tmp/mydir]-F filename True if filename is a regular file

Shell Script-1

.: Denotes any character*: Matches the previous character, A * indicates: 0 or more A+: Matches the preceding character to represent 1 or more preceding characters?: matches the preceding character to represent 0 or more preceding characters#!

Shell script obtains native IP address

Tag: IP address #!/bin/bash#author: #date: 2015-6-13#filename:ip.sh############################ #ifconfig_cmd = ' which  Ifconfig ' $ifconfig _cmd > ifconfig.me################################## #function  obtain_ip_ Information () { if grep -q  '

A shell script that automatically restarts after the monitoring process hangs on Linux

This article describes the shell script, through a while-do loop, with Ps-ef|grep check whether the loader process is running, if not run, then start to ensure that the crash hangs the process, and automatically restart in a timely manner. The

Special usage of $0,$?,$! in shell

$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the Case of "" ", in the

IFS usage in the shell

I. Introduction of IFSthe Shell script has a variable called IFS (Internal field seprator), the internal domain delimiter. The full definition is the shell uses the value stored in IFS, which are the space, tab, and newline characters by default, to

Logical judgment in the shell

[Condition 1-a Condition 2] When 1 and 2 are true [condition 1-o condition 2] when 1 and 2 one is true [! condition] Take counter && and | |   Or! unsigned [-D name] && Echo ' is dir ' is true when the name is directory, then the input has the

The classic shell surface question arrangement

First, remove the number of occurrences of the shell in the/etc/passwd file: Here is a partial content of a/etc/passwd file. The topic asks to take out the shell and counts the number, the shell refers to the back/bin/bash,/sbin/nologin and so on,

Shell Process Control-IF statement

Single-branch If condition statementIf [conditional judgment]; ThenProgramFiExample: Judging partition usage#!/bin/bash# Author:huangrui (email:[email protected]) rate=$(DF-H |grep "sda1"|awk '{print $}'|Cut-F1-D"%") if[$rate-GT the]; Then Echo

Shell Regular Expression

basic regular expression metacharacters role * matches the previous character 0 or more times . match any character except newline

Shell script (i)

Shell script (i)1. Common Commands(1) System Management#useradd, a user group with the same user name is created by default when a new user is added#创建用户user1 and specify a UID of 1111, the owning group is 2222 (test), and the home directory is not

Linux Shell Programming String stitching

If you want to add a character after a variable, you can use the following method: $value 1=home$value2=${value1}"="Echo$value 2 Add the string variable you want to add {}, and you need to put the $ out. The result of this output is: Home=, which

Bash Shell usage notes

Bash Shell usage notesThe use of the shell is profound, I comb the basic knowledge, tidy up a simple usage, the specific requirements for self-study.1.  calculation # echo $ ((1+2)) 3# echo $ ((1+2+3)) 6# echo 3+2+5 |bc102.  If usage if [  $i  -eq 0 

Realization of clustering algorithm by Spark-shell

Spark version 1.3.1Scala version 2.11.6Reference official website http://spark.apache.org/docs/latest/mllib-clustering.htmlAfter running Spark-shell, first import the required modulesImport Org.apache.spark.mllib.clustering.KMeansImport

Shell script [Operational expressions, conditional control statements], shell expressions

Shell script [Operational expressions, conditional control statements], shell expressions #! /Bin/bash # The four expressions you deserve to add to your favorites. Val1 = 1val2 = 1val3 = 1val4 = 1val5 = 1val6 = 1val7 = 1let val1 ++ (val2 ++) val3 =

Solution for shell not displaying the user name path in CentOS

Solution for shell not displaying the user name path in CentOS In CentOS, shell-bash-4.1 $ solution to not display the user name path Problem description: Add a new user under CentOS. After logging in, the shell script information is as follows:

Total Pages: 541 1 .... 479 480 481 482 483 .... 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.