A few simple shell scripts to draw

md5

First timed crawl server JVM related information #! /bin/sh #get_current_time export java_home=/opt/jdk1.6.0_10/ export path= $JAVA _home/bin: $PATH Export classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar: $CLASSPATH date= '

Shell text filtering (regular expressions) __ Regular Expressions

When you extract or filter text from a file or command output, you can use regular expressions (R E), which are collections of special or not very special string patterns. ^ matches only the beginning of the line$ only match end of line* Only one

Shell scripting introduction, structure and execution, variables, and date command usage

First, Shell script introductionThe shell is a scripting language, and the shell is a collection of system commands1, can use logic judgment, cycle and other grammar;It's a bit like C language, but it's fundamentally different.2, can be customized

Shell Programming II Conditional judgment

1. Expression of conditional judgment: [ 表达式 ] 或者 [[ 表达式 ]] 或者 test 表达式,要注意的是[ ]或者[[ ]]中括号内要与表达式之间用空格隔开,否则会报错。2.if Else FI conditional statement 格式: if 条件 ;then 如果条件为真则执行这里的语句 else

If Judgment statement for Shell script

If statement1, according to the file type to judge-d file) to determine if the file exists and is a character device file (the character device is true)-e file) to determine if the file exists (exists as true)[-e/root]echo $? The output is 0 #判断为真,

Linux Common shell types

Different shells have different functions, the shell also decided that the default shell in Linux is/bin/bash, the popular shell has ash, bash, Ksh, CSH, zsh, and so on, different shells have their own characteristics and use.BashThe Shell,bash

Shell Special Symbols

Symbol Meaning ; Command delimiter # configuration file comments; Root user command terminal prompt ~ Home Directory CD ~ - Previous Path CD-Su-linux Switching user

Ubuntu-shell command extract a file branch

Start a few lines: HeadEnd a few lines: tailMiddle lines: SED1. If you only want to see the first 100 lines of the file, you can use the Head command, such as head-100 filename2. If you want to view the 100 lines of the file, you can use the tail

Shell Date Command Get time--rich and colorful

The simplest output:# datewed June 6 : £20181. Gets the current time, output in the specified format: # date +%y-%m-%d standard output date (where: + must be,-optional, can also be output according to the specified style, for example:/,* 2018 -06 -

Package multiple files into a single shell

1.Scripting purposes Automate the deployment of your environment and combine packages and deployment scripts into one file to avoid scripting and file separation. 2. Experimental Environment(1) Linux EnvironmentCentOS 7.4(2) package[email protected]

Linux--shell Programming Basics

There are two types of programming languagesStrong type: such as C language. The data has a specific type that is declared before it can be used. Data operations must conform to type requirements (e.g., string type data cannot be arithmetic directly

Lab Four Shell programming (2)

First, the experimental stepsBasic usage of 1.shell variables and usage of common symbols(1) Change the main prompt to the user's home directory nameExport ps= $HOME(2) Assign the string DOS file c:>\ $student \* to the variable x and display it(3)

Shell script timed background execution

1. Use the & symbol to execute commands in the backgroundYou can add the & symbol to the Linux command or script to make the command or script execute in the background, for example:.$./my-shell-script.sh &2. Use Nohup to execute commands in the

Shell script loops and signals

Conditional judgmentIf condition 1;thenCOMMANDElif condition 2;thenCOMMANDElseCommand (:): Indicates that pass does not execute any commandFiRead user input for data judgment1 Echo-N"Enter your number:"2 Read Userinput3 Expr$userinput

SSH Secure Shell Chinese garbled

Scenario One: Modify environment variables for Linux serversWith Linux, there is a. bash_profile configuration file under the user root, which is only valid for the current user. Modify the/etc/profile file if it is valid for all usersUse the LS-A

Shell conditional expression

1. The common syntax for conditional testing is as follows1, test expression2. [Test expression] #两边需要有空格3, [[Test expression]]4, (test expression))DescriptionThe first and second are equivalent, the third is the extended Test command, and syntax 4

Common shell commands under Linux

English original link: https://www.lopezferrando.com/30-interesting-shell-commands/1. Monitoring commands (run every 2 seconds)"ls -larth"2. Kill the program with one portsudo fuser -k 8000/tcp3. Limit the memory usage of the following

Jenkins execution shell command prompt cannot find the command resolution

Execute the shell script with Jenkins and execute a command:2Tips:[ADB] $/bin/sh-xe/users/xxxxx/tools/apache-tomcat-8.5.30/temp/jenkins8525959692743554347.sh+ adb shell input KeyEvent 26/users/xxxxx/tools/apache-tomcat-8.5.30/temp/jenkins852595969274

Shell Script Programming arrays

Array:Variables: Storing the memory space of a single elementArray: A contiguous memory space that stores multiple elements, equivalent to a collection of multiple variablesArray name and IndexIndex: Numbering starting from 0, which is a numeric

Shell string array

Array Declaration ArrayDeclare-a Array_NameDeclare-a array_name: Associative arrayNote: The two cannot be converted to each otherArray name and subscript (index)Index: Numbering starting from 0, which is a numeric indexNote: Indexes can support the

Total Pages: 541 1 .... 281 282 283 284 285 .... 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.