Array usage in shell scripts in Linux

In the shell (I'm bash here) there is no traditional "data type", and the values stored in any variable are "strings" of characters. Of course, you can declare a variable to be an integral type, an array, and so on by declare. Among them, the array

Instructions for variable usage in a shell in Linux

Variable Description:$$The shell itself PID (ProcessID)$!The PID of the Shell's last running background process$?End code of the last command to run (return value)$-Flag list using the SET command$*A list of all parameters. Output all parameters in

Linux Shell Learning notes in the last section, the temperature and knowledge of the new _ other

Scripting Tips Script file name naming rules The characters for the file name include Letters, Numbers, ".", "_" and "-", note: The script's filename cannot begin with a number. Name the name of the script file, use English words, phrases,

Linux Operational Dimension Common command _linux Shell

Own small website runs in the Aliyun ECS above, occasionally also analyzes own website server log, looks at the website the amount of visits. See if there's any black-and-wide sabotage! So collect, organize some server log Analysis command, we can

A shell small case (create date directory) _linux Shell

I saw a shell problem today, just to practice practicingYou need to create subdirectories (named in years) in multiple directories (such as Beijing Shanghai Tianjin Guangzhou, and so on), then enter subdirectories, create new directories, and name

Automated download and detection of FTP file backup shell script _linux Shell

Implementation code: #!/bin/bash #ftime0 =$ (ll/root/hbshell/down.txt | awk ' {print $} ') #ftime1 =$ (ll/root/hbshell/down.txt | awk ' {print $} ') touch/root/hbshell/down.txt while:do if [[/root/hbshell/down.txt-nt/root/hbshell/down_cp.txt]

Git Common command to organize _linux shell

Objective Here does not introduce git, table a see the command line is afraid, commonly used commands are these, basically meet more than 99% of the project needs, very practical. Body   First, Common git command 1.1 Git clone [] From remote

Arrays and traversal in the DBA's Linux shell

dba

How arrays are declared array= (element1 element2 element3 .... elementn) array= (192.168.1.91 192.168.1.92 192.168.1.93)2. Array reads# echo ${array[index]} # echo ${array=[0]}# echo ${array[2]}3. Traversing all arrays# echo ${array[@]}# Echo $

Shell Programming (ix) arithmetic operations

The arithmetic operation of bash script programming+,-,*,/, * *,%Arithmetic operation format:(1) Let var= arithmetic operation expression(2) var=$[arithmetic operation expression](3) var=$ (arithmetic operation expression)(4) var=$ (expr $ARG 1 $OP $

Using the shell to automate script files under Linux

The following instance is used in the Centos6.5 64-bit operating systemOne, the regular copy fileA. Create the tomcatback.sh file in the/usr/local/wfjb_web_back directoryFile contents:#将tomcat中的应用wfjb_web copied to the/usr/local/wfjb_web_back/tomcat_

XAMPP Default configuration Take Shell

XAMPP Default configuration Take ShellFirst, let's start with science. XAMPP (Apache+mysql+php+perl) is a powerful built-in XAMPP software Station integration package is an easy-to-install Apache release with MySQL, PHP and PERL. XAMPP is really

Shell Script Auto-Configure send QQ mail

Every time I write a script under Linux has the ability to send mail, but the configuration under Linux always forget, so this time wrote a small script, record, next time you want to configure the script to run the line. QQ mailbox is used

The first time you see spark crash: The spark shell memory Oom phenomenon!

The first time I saw Spark crashSpark Shell Memory Oom phenomenonTo do the spark graph calculation, so with Google's web-google.txt, size 71.8MB.With the command:Val graph = Graphloader.edgelistfile (SC,

Example of use of eval in shell

Function Description: Tell the shell to remove the eval parameters and re-calculate the contents of the parameters.Syntax: eval [parameter]Supplementary Note: Eval can read a series of parameters and then execute according to the characteristics of

Shell Script Raiders (learning note)--1.4 variable (base)

Suppose that the variable str, when setting or modifying a variable property, does not have a $ number, only a reference variable is used. This means that the variable is str, not $str. $ is just a symbolic form of manipulating variables, as well as

Shell script, awk subtracts the value of each line of data in file a from the corresponding row of file B and obtains its absolute values.

Thinking of solving problemsThe file Shu is the following.220 34 50 70553 556 32 211 1 14) 98 33The file Jian is the following.1082Want to get the result is the following.210 24 40 60545 548 24 131 1 12) 96 31Use awk to get the results you

Upx3.03+upolyx.5 Shell v1.0 Chinese Green Edition

Software Name: Upx3.03+upolyx.5 Shell v1.0 Chinese Green Editionsoftware Category: Chinese softwareOperating Environment: Windowssoftware language: Simplified ChineseLicensing method: free versionFile Size:635 KBSoftware level:Finishing Time:2012-10-

3 Windows environment interacts with Shell

/** * by Sshconfig Configuration get a session * @param conf * @return*/ Public StaticSession createsession (sshconfig conf) {Log.info ("try Connect to"+ conf.gethostip () +", Username:"+ conf.getusername () +", Password:"+ Conf.getpassword () +"

Linux Shell multithreaded Execution program

There is no real multi-threading in the shell, and to implement multithreading you can start multiple back-end processes to maximize CPU Performance.Look directly at the code Example.(1) Sequential execution of code1#!/bin/Bash2 Date3 forIinch`seq 1

Prohibit root ssh logon to shell scripts in Centos

Linux prohibits root users from logging on through sshRoot users are prohibited from logging on through ssh by operating the sshd_config configuration file.1. Open the ssh configuration fileVim/etc/ssh/sshd_config2. Find the following line of text

Total Pages: 541 1 .... 210 211 212 213 214 .... 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.