Follow Me---quickstart shell scripting (ii)

Last time I wrote the shell, I found that VI and VIM are different: Vim is the upgrade version of VI, it is not only compatible with all VI directives, but also some new features in it. Vim is much more useful than VI.This time the last content, the

Shell Step by Step (1)--Introduction

1. View Current user (number of users) [email protected]: ~# who [| wc-l][email protected]: ~# whoKallen Tty4 2015-01-16 10:46Kallen tty5 2015-01-16 10:47Kallen Tty2 2015-01-16 10:42Kallen tty3 2015-01-16 10:42Root Tty6 2015-01-16 10:58Kallen tty1 2

The shell script of Linux learning-------control flow structure

[This is my own study notes, welcome reprint, but please specify the source:http://blog.csdn.net/jesson20121020] Start learning some shell flow control structures like other high-level languages today Flow control Statements:1. If

Shell symbol expansion

Character expansion*This "*" character means matching any character in the file nameThe shell expands "*" into something else, before the echo command is executed.~ Home DirectoryArithmetic expression expansionAn arithmetic expression expands using

Shell floating point arithmetic tool BC

Shell floating point arithmetic tool BCBC supports floating-point numbers, which is an advanced tool for mathematical operations.[[Email protected] Desktop]# BCBC 1.06Copyright 1991-1994, 1997, 1998, Free Software Foundation, Inc.This is the free

Linux shell String Operations (length, find, replace) detailed

String-related operations are often involved in the shell batch process. There are a lot of command statements, such as: awk,sed can do string various operations. In fact, the shell built a series of operating symbols, you can achieve similar

How to view the system's built-in shell commands and help information

1. Open the terminal and enter the help command to see a list of the built-in shell commands for the system's default shell (usually bash):[[Email protected] ~]$ help GNU bash, version4.1.2(1)-release (x86_64-redhat-linux-GNU) These shell commands

The Shell history record audit and monitoring

The Shell history record audit and monitoringHttp://netkiller.github.io/journal/shell.history.html Mr.Neo Chen(Chen Jingfeng),Netkiller, Bg7nyt China Guangdong province Shenzhen Khe Sanh Street, Longhua District, civil Administration518131+86 1311366

View the currently used shell

PS |  grep $$ | awk ' {print $4} 'PS command without parameters displays the status of the process associated with the current terminal$$ variable stores the PID of the current processPS Fourth column is the command used by the process, if it is a

Use shell scripts to slice task_list and execute separate scripts

1#/bin/SH2 3task_list=$14Len= 'WC-L $TASK _list |awk '{print $}'`5 6 #noExce () {7 sed-N'1,'$ (((len/5) ))'P'$TASK _list > $TASK _list'Task_list1'8 sed-N"'$ (((len/5)*1+1))','$ (((len/5)*2))'P'$TASK _list > $TASK _list'Task_list2'9 sed-N"'$ (((len/5)

SHELL System File Integrity check

System Integrity Audit ToolThe shell script is as follows:The #!/bin/bash##  variable is first declared to use shopt -s -o nounset#  declaration #  build Date date=$ (date + '%Y%m%d%H %m%s ') #  join the approved directory           #Dirs =

Configuring the Execute Remote shell command in Jenkins

With Jenkins, you know, there's an add buld step in the build configuration, with two options:1. Execute Windows Batch Command2. Execute ShellThe 1th one is to execute the Windows command, and the 2nd is to execute the shell script.At first I

Shell Case ESAC Statement

Case ... Esac is similar to the switch ... case statement in other languages, and is a multi-branch selection structure.The case statement matches a value or a pattern, and if the match succeeds, the matching command is executed. The case statement

Use automated shell scripts to find detailed thread information for CPU use

After adding some interceptor code, the CPU alarm shows that CPU utilization exceeds 100%.To find out exactly what code consumes too much resources, find a blog post from the Web, reproduced as follows:http://blog.csdn.net/guixunlong/article/details/

Use of $ {},#and % in Shell

Suppose we define a variable: file =/dir1/dir2/dir3/my.file.txt You can replace $ {} with different values: $ {file # */}: Delete the first/and its left string: dir1/dir2/dir3/my.file.txt $ {file # */}: Delete the last/and its left string:

Zabbix msmtp (Shell)

#! /bin/bash################################################################################# Zabbix extensions (C) 2011-* Joseph Bueno # Published under GNU General Public License version 2 or later.# See LICENSE.txt#--------------------------------

How to use FTP in shell scripts

1. FTP automatically logs in to batch download files.##### From/home/data on the FTP server to the local/home/databackup #####! /Bin/bashFTP-n Open 192.168.1.171User guest 123456.BinaryCD/home/DataLCD/home/databackupPromptMget *CloseBye!2. FTP

Shell variables and string operations

By default, bash shell is a non-typed footfall language. Unless specifically declared with declare, it does not distinguish whether a variable is an integer variable, a floating point variable, or a string variable. All variables in bash shell are

Linux Shell Parameter extension (Parameter Expansion), parameterexpansion

Linux Shell Parameter extension (Parameter Expansion), parameterexpansion The main reference: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02 Other materials:

Use an automated shell script to find detailed thread information for CPU usage

Use an automated shell script to find detailed thread information for CPU usage After some interceptor code is added to the project, the CPU alarm shows that the CPU usage exceeds 100%; If you want to find out which code consumes too much resources,

Total Pages: 541 1 .... 122 123 124 125 126 .... 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.