Linux Video Learning 3 (shell and Network)

1.shell of learning.There are three types of shells:/bin/sh,/bin/csh,/bin/ksh.See what kind of shell is currently in use: Command env (displays the environment variables for the current operating system).Change the shell type: chsh-s/bin/cshShell

Shell string length

Method One of the $ expr length "Find out the length of this string from the Linux Bash shell." 57 Method Two Str1=aaaaaaaaaecho ${#str1}Echo-n xxxxx |wc-cecho Xxxx|awk ' {print length ($)} 'echo "$str" |awk ' {print length ($)} 'awk ' {$a =length ($

Linux Shell Common Tips (10) pipeline combination

Linux Shell Common Tips (10) pipeline combinationTwenty. To get the system run data through the pipeline Combination shell command :1. Output the 5 most memory-intensive commands in the current system:#1) Lists all the processes that are running on

Exception analysis of shell script variable get program output result

#! /bin/bashpid=$ (pgrep Hello) echo ${pid}The script name is hello_test.shAlways returns two values when a hello process existsWhen the hello process does not exist, the return value is not empty, always returns a value, runs multiple times, and

The echo printf command for Shell programming

Both Echo and printf in the shell can be used as output, and printf is an enhanced version of EchoShow escape charactersecho \ "Abcdef\" ">>> "ABCdef"Show variablesAge=23echo "My Age is $age">>>my name is 23In the process of use, in order to avoid

A shell script that checks partition memory and sends mail

#!/bin/bashRead-t 30-p "Please enter the partition you want to find (format Sda1~sda3):" AAAnumber=$ (df-h | grep $aaa | awk ' {print $} ' | cut-d "%"-F 1)If [$number-ge "70"]Thenecho "is not working properly, the message has been sent to your

First knowledge of the shell

What is the shell? Believe that as long as touch the computer, for the operating system (whether Linux, Unix or Windows) a little concept of friends have heard the term, because as long as there is an operating system, it is inseparable from the

Shell detects whether the IP entered is legitimate

Detects whether the IP entered is legitimate#!/bin/bashRead-p "Input An IP address:" Ip_addrN1= ' echo $ip _addr|awk-f. ' {print $} 'N2= ' echo $ip _addr|awk-f. ' {print $} 'N3= ' echo $ip _addr|awk-f. ' {print $} 'N4= ' echo $ip _addr|awk-f. '

Shell scripts for quick deployment of Tomcat projects

In order to do cluster testing, 3 tomcat is installed on each machine, each time the project is released, it is necessary to repeatedly knock some commands, check that the Tomcat process has not stopped before restarting Tomcat, and kill the process

A set of Linux Shell scripting little Exercises

# Linux Shell splits strings into groupsresult=$ (facter | awk '/ipaddress/&&!/ipaddress_lo/{print $ "$ $} ') array= ($result)# Determine if a variable exists (not to determine whether it is empty)If [-Z ${var+x}]; Then echo "Var is unset"; else

Shell Learning Notes

#表示该脚本以bash方式运行1. #!/bin/bash# accepts the input and assigns the value to the variable 2. Read variable name #使用变量3. ${variable name} #此变量只读4. readonly variable name #删除此变量, cannot delete read-only variable 5. The unset

Shell Learning notes-Shell variables

First, the name of the variableThe variable name must begin with a letter or underscore, consisting of a letter, number, or underscore, and the variable name cannot exceed 255 characters in length.Ii. Classification of variables1. User-defined

Shell Getting Started-connectors (and, and, or)

Special Symbol:&&Note: Also, the left and right sides are two commands, the execution on the left will only execute the command on the side. RightSpecial Symbols: | |Note: Alternatively, the left and right sides are two commands, the command on the

Shell script programming string testing and looping

== : Two strings are equal! =: Two characters not equal> : Whether a string is greater than another string : Whether a string is less than another string- N String : Tests whether the specified string is empty- s string : Tests whether the

Shell simulates concurrent execution

Reference: http://www.51testing.com/html/28/116228-238978.htmlhttp://blog.chinaunix.net/uid-27571599-id-3473078.html         in bash, use background tasks to achieve multi-process tasks. In uncontrolled mode, regardless of the number of tasks, all

Shell Script Learning Note-----Shell variables

1, in the assignment statement Name=value can not have a space, for example: name = value of the form is considered to be three variables, because essentially, the content of the script is passed to the shell program variables, and the variables are

Shell Foundation three: Loop statement for

First, the Loop statement forloop control statements in Bash :for,while,untilFor loop Syntax 1:For variable name in list;Loop bodyDoneOperating features:First pass: Assigns the first element in the list the variable name definition, then executes

[Goto] Shell script for synchronizing hive data updates

Introduction:The previous article, Sqoop1.4.4, implements the import of incremental data from oracle10g into Hive0.13.1 and updates the primary table http://www.linuxidc.com/Linux/2014-09/106282 in hive. The HTM describes the principle of

Common Linux Commands Explanation (fifth day)--shell variable learning

Due to the limited time, I wrote this blog for a maximum of 30 minutes. Only as a study note, the content will be as clear as possible. If you don't know what to say, you can hit me! Joke opened, formally began today's study.Some of the

Linux production server shell script sharing

Linux production server shell script sharing2012-6-6 86 Market Network LinuxAs a Linux/unix system administrator, I often meet people asking this question: what can the shell do? PHP is so powerful, why not use PHP to get the job done? In fact,

Total Pages: 541 1 .... 200 201 202 203 204 .... 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.