string of Shell intercept variable

From: http://blog.sina.com.cn/s/blog_7c95e5850100zpch.htmlSuppose there is a variable var=http://www.linuxidc.com/test.htma # Intercept, delete the left character, and leave the right character. echo ${var#*//} where  var  is the variable name,# 

Shell Script Learning 18 shell for loop

Similar to other programming languages, the shell supports A for loop.The general format for A for loop is:For variable in list do Command1 command2 ... CommandndoneA list is a sequence of values (numbers, strings, and so on), each

CentOS Linux Next tomcat stop, view log shell script

The Tomcat installation directory for CentOS:/usr/local/tomcatVI mytomcatuitl.sh creating fileschmod u+x mytomcatutil.sh Assignment Execution permissionsShell script:1#!/bin/Bash2 3 # tomcat Start, stop, log display script4 5 if[ $1=="']; Then6

Emacs executes commands in shell edit buffers

-Execute one command at a timeM!-Executes a shell command and puts the result in the current edit bufferC-u M!=============================The following formally enters the shell edit buffer=============================-Start Shell Edit bufferM x

Linux-shell notes

Shut down the system: shutdown [options] [TIME] [warning message]-K does not really shut down just send a warning message to all users-R restart immediately after shutdown-H does not restart after shutting down the machine-F Quick shutdown without

Shell Script Small Test sledgehammer (PAN)--good news

Good newsGood newsGood newsGood newsGood newsGood news, this series of scripts has been opened on GitHub, I named "Easy Shell " (Click this entry).Now that you have included the scripts in the previous installments, there will be many other scripts

The study record of Shell 13 question

On the BBS saw the Shell 13 asked the post, because the comparison is far away, afraid later can not find, put the notes over,Original address:Shell 13 AskHttp://bbs.chinaunix.net/thread-2033675-1-1.htmlPost the notes I made:, why a Shell user

12 Linux Systems High-frequency command line and Shell small script

The following are some of the more commonly used command line or shell scripts that are extracted during the deployment of OpenStack, for informational purposes only.1. Kill all existing zombie processesPs-ef | grep Defunc | Grep-v grep | awk '

Shell:bash date before and after day based on a specified date

Tag: Date ####################################################################### Copyright C # # All rights Reserved # # Name : yestoday.sh# Author:canux [email protected] # # version:v1.0 # time:wed (04:37:37 PM cst# Description : ################

Meaning of specific compliance variables in shell scripts

$# the number of arguments passed to the script$* displays all parameters passed to the script in a single string. Unlike positional variables, this option parameter can be more than 9$$ the current process PID number for the script to run$! Process

Shell Loop Loops

1. CycleThe shell loops and executes a program continuously until the condition is met. Loops are divided into 4 types, while loops, until loops, for fixed processing, for numeric processing.2. While loopThe while loop is executed until the

Test switches and special parameters in shell scripts

1. Test SwitchSome test instructions are included in the shell, and the following table lists the meanings of these test instructions and whether they are available for the test command, bash, Ksh. Switch Test Bash Ksh

[Shell] Shell Common Special symbols

Meet Meaning && Command1 && command2: Command 1 returns True (Command return value $ = = 0), command 2 can be executed. Can be used for if judgment.CP 1.txt.. /&& echo "succes" #-->successCP 1.txt.. /&& rm-f. /1.txt && echo

Local variables in shell scripts

Defining functions in the shell allows the code to be modularized to facilitate reuse of code. But the scope of the variables and functions of the script itself can be confusing, and here's a look at the problem.(1)The variables defined in the shell

Basic syntax structure summary of Shell programming basics

First, conditional statements Simple conditionsif Then # When the condition is established, the content is executed;fi If the reverse is written, the meaning offiif Complex conditionsif Then # When condition is established, execute

Classic Sort algorithm-Hill sort Shell sort

Classic Sort algorithm-Hill sort Shell sortHill sort Shell Sort is an improvement based on the insertion sort , which is also divided into two parts,The first part, Hill sort IntroductionThe second part, how to choose the keyword, the key is to

CentOS 7.0 Install peanut shell

No wget first download get command yum-y install wget1. Download Peanut shells[Email protected] ~]# wget http://download.oray.com/peanuthull/linux/phddns-2.0.6.x86_64.tar.gz2. Unzip the tar.gz[Email protected] ~]# tar zxvf

RHEL automatically installs the zookeeper shell script

RHEL automatically installs the zookeeper shell scriptRHEL automatically installs the zookeeper shell script A: This script runs on Linux RHEL6. B, C, D,...: The machine on which zookeeper cluster is to be installed, Linux RHEL6 First, you can log

Shell script to replace the tomcat cluster war package

Shell script to replace the tomcat cluster war package Run the command to log on to the server without ssh. The configuration file does not change much to overwrite the previous configuration. Profile configuration file Bak =/home/wsm/bakWebapps

A linux shell script that modifies the configuration file,

A linux shell script that modifies the configuration file, Not long ago, I found a Blog reading the configuration file. Now, you need to set up an interface for users to modify similar configuration files through the web interface. The big way is to

Total Pages: 541 1 .... 232 233 234 235 236 .... 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.