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
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
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 $, $
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
.: 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#!
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
$$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
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
[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
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 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
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 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
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
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:
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