Shift usage in Shell

[[Email protected] shell] # Cat shift. Sh #! /Bin/bash Until [$ #-EQ 0]; do Echo "the first is: $1 total is $ #" Shift Done [[Email protected] shell] #./shift. Sh 1 2 3 4 5 6 The first is: 1 total is 6 The first is: 2 total is 5 The first

Method for obtaining the process ID by shell: pidof | pgrep | PS-A + grep + awk

Method for obtaining the process ID by shell: I know there are three things I have learned and practiced: PS-A | grep "cmdname" | awk '{print $1 }' Pidof "parameter name" Pgrep "cmdname" The three running results in bash and busybox ash

[2] HDU 2446 shell pyramid

A lot of balls form a pyramid Layer X has x * (x + 1)/2 balls. Give you a second to represent the second ball at the first layer of the pyramid. The number of rows in the layer at which it is located Formula 1: x * (x + 1) * (x + 2)/6 Formula 2: x *

How to Implement tomato work using shell

#! /Bin/sh # program description # scripts for implementing the tomato working method # tomato working method rules # Rule 1: A tomato lasts for 30 minutes, including 25 minutes of work and 5 minutes of rest. # Rule 2: the time of a tomato is

Shell signal capturing

Tag: Shell Hup (1) suspended, usually caused by terminal disconnection or user exit INT (2) interrupt, usually caused by Ctrl + C Combination Quit (3) exits, usually caused by Ctrl +/Combination Abrt (6) abort, usually caused by some serious

Customized shell in Ubuntu

The custom shell in Ubuntu generally includes the Host Name and file directory. when too many files are opened, the whole shell will become very long, thus affecting the vision. Enter $ echo $ SP1 in the terminal to know the default shell style, for

"Peanut shell" + "visualsvn" cleverly implement remote code version control

Recently, due to project requirements, svnserver is required to be remotely renewed, but there is no fixed domain name or IP address. Therefore, we plan to apply for a free domain name to build a server, and then deploy visual SVN on the server, you

Shell script tracing and debug

Shell script tracing and debug Before scripts runs, the most feared problem is the syntax error! So how can we debug it? Is there a way to determine whether there is a problem without directly running the scripts? Haha! Of course! Let's take the

Zabbix automatically installs server (Shell)

#!/bin/bashDBUSER=‘root‘DBPASS=‘‘DBHOST=‘localhost‘ZBX_VER=‘2.0.1‘function checkReturn {  if [ $1 -ne 0 ]; then     echo "fail: $2"     echo "$3"     exit  else     echo "pass: $2"  fi  sleep 3}cat  /dev/null  /tmp/mytmp393; mv /tmp/mytmp393 /etc/zab

"Peanut shell" + "visualsvn" cleverly implement remote code version control

Recently, as the project requires remote access to the svn server, but there is no fixed domain name or IP address, we plan to use a peanut shell to apply for a free domain name to build a server, and then deploy visualsvn on the server, you can

How to find and fix bash shell-shock vulnerability CVE-2014-6271 in UNIX like System

cve

Type COMMAND-env x = '() {:;}; echo vulnerable 'bash-C' echo hello' in your terminal. if your system is vulnerable then abve command will return output like abovevulnerable Hello all the Debian/Ubuntu user to patch it kindly update your Bash to

Shell to view the basic information script of the system

#! /Bin/bashecho "IP:" ifconfig | grep "Inet ADDR" | grep-V 127.0.0.1 | awk '{print $2}' | awk-F ': ''{print $2} 'echo" Product Name: "dmidecode | grep nameecho" CPU info: "dmidecode | grep-I cpu | grep-I version | awk-F ': ''{print $2} 'echo" disk

Shell automatically log on to upload and download

   Remote SCP file by using reverse CT in shell script: Before using reverse CT, you need to install two RPM packages: # rpm-ihv centos/expect-5.43.0-5.1.i386.rpm # Rpm-ihv centos/expect-devel-5.43.0-5.1.i386.rpm or yum directly download and install

Shell script Learning (1)

Common shell script interpreters in Unix/Linux include bash, sh, CSH, and KSh. Bash is the most common interpreter in Linux. Script Language isInterpreted languageWhen executing such programs, the interpreter (Interpreter) needs to read the source

Summary of the For Loop in Shell

There are a lot of for loop usage in shell. I always want to summarize it. Today I saw a summary of for loop usage on the Internet, which is very comprehensive. So I will turn to research and study... 1. For (I = 1; I 2. Commonly Used in shell is

Shell Boolean operation

1. The true and false values in bash are not the values 0 and 1 we generally think. True and false are built-in shell commands that return logical values. For example: $ True $ Echo $? 0 $ False $

Shell split File

Tag: Shell Small programs for colleagues 140822,1406181801491716879,221.203.75.168,20140822000014140823,1408051715321587060,101.28.174.242,20140822000127140823,1408051715321587060,101.28.174.242,20140822000129140824,1408051715321587060,101.28.174.24

O & M series: 08, spark Shell

./Bin/spark-shell -- master spark: // master: Port StartCluster mode: Master = spark: // 'hostname': 7077 bin/spark-shellbin/spark-shell -- master spark: // es122: 7077 standalone mode: bin/spark-shell local [4] loads a text file spark context

Shell: displays the basic system information script and shell basic information script.

Shell: displays the basic system information script and shell basic information script. #! /Bin/bashecho "IP:" ifconfig | grep "inet addr" | grep-v 127.0.0.1 | awk '{print $2}' | awk-F ': ''{print $2} 'echo" Product Name: "dmidecode | grep Nameecho"

Single quotation marks, double quotation marks, reverse quotation marks, and shell double quotation marks in shell

Single quotation marks, double quotation marks, reverse quotation marks, and shell double quotation marks in shell In shell, there are three types of quotation marks: single quotation marks, double quotation marks, and reverse quotation

Total Pages: 541 1 .... 394 395 396 397 398 .... 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.