Bash shell in shift usage share _linux shell

Shift can be used to move position parameters to the left.Shell's name is $The first argument is $Second argument $Nth parameter $nAll parameters $@ or $*Number of parameters $# Shift default is shift 1Take the example below: Copy Code code

SED deletes script code for one line of content in a file _linux shell

Take a look at the contents of the original file: Copy Code code as follows: Root@localhost ~]# Cat File.txt Hello World A:b:c-h-N A:b:c-h-N SED deletes related rows based on conditions: Copy Code code as follows:

Shell script to see the real footprint of process memory _linux Shell

Copy Code code as follows: #!/bin/bash #****************************************************************# # SCRIPTNAME:PM # AUTHOR:OSDBA # Create Date:2010-01-31 # Modify Author: # Modify Date:2010-01-31 # Function:show processes Memory

Shell script Implementation Analysis The area where IP resides in the Apache log _linux shell

Components used to query IP addresses Copy Code code as follows: wget http://rfyiamcool.googlecode.com/files/nali-0.1.tar.gz Tar zxvf nali-0.1.tar.gz CD nali-0.1 ./configure && make && make install The steps and Nginx are

A method for removing intermediate nodes given the middle node pointer of a linked list _linux shell

The problem is as follows Input: Pointer to node C in list A->b->c->d->e Output: no return value, but new list becomes a->b->d->e Answer: Thought for a long time did not think out, read the hint to know the solution. Here's a little trick. To remove

Linux automatic cleanup log script sharing _linux Shell

1. A streamlined script for automating the deployment of systems, with the main function of cleaning up all directory logs 2. According to the given log directory, delete time combined with crontab to clean the log, clean up after completion, after

Linux command detailed method of mounting the optical drive _linux Shell

Linux hardware devices in the/dev directory, the optical drive is one of them./dev/cdrom represents the optical drive, the method of mounting the optical drive is as follows (in root): Copy Code code as follows: Mkdir/mnt/cdrom

Shell script implements killing subprocess, zombie process _linux shell

The core server ran a bunch of scripts, procedures, it is inevitable that sometimes zombie process, dead or alive in the occupied resources there, initially just wrote a keyword to kill the process of the Linux shell script, and later found that

Parsing the implementation code of the shell sort _c language

Copy Code code as follows: #include using namespace Std; void Shellqin (int a[],int N) { int GAP=N/2; int i,j; for (; gap>0;gap=gap/2)//Set the initial gap, according to the Gap group, Gap in accordance with GAP/2 decline { After the

Shell script-produced Terminal session playback feature script sharing _linux shell

Not long ago I saw two interesting commands in the book--script and Srciptreplay, which can record a terminal session in a file, that is, we can create a command-line video tutorial through a terminal session, or we can share session files with

Shell implements system time and BIOS time synchronization calibration script sharing _linux Shell

The script is mainly from the defined NTP server list to get the server address to synchronize, if the first unsuccessful, will continue to change the address to sync! Not perfect place also please point out! Copy Code code as follows: #

Shell uses Mysqld_multi to automate multiple instances from library script _linux Shell

Copy Code code as follows: # Cat Doallslave.sh #!/bin/sh #code by Scpman #mail: scpman@live.com #blog: http://www.scpman.com #name: "Doallslave.sh" Helpinfo () { Echo-e ' \t\thelp View Help information ' Echo-e ' \t\t automatically do

Nginx Log Cutting script sharing _linux shell

Implementation method One #!/bin/bash logs_path= "/data/application/nginx/logs" pid_path= "/data/application/nginx/nginx.pid" Month= ' Date +%y-%m ' date= ' date +%y-%m-%d ' time= ' date +%h ' waittime=$ ( (24*60*60)) logcut () { CD $Logs

Shell Implementation Fizzbuzzwhizz Example (Pull network interview question) _linux Shell

Question: Https://www.jinshuju.net/f/EGQL3D Language: Shell (Bash)Operation mode:SH num-game.sh digit 1 digit 2 Number 3If you do not want to use the method of passing numbers, you can modify num-game.sh line 9th tonum=$*Tonum= ' number 1 digit 2

Shell Monitor iptables run State _linux shell

Recently in the debugging server iptables, oneself made a timed turn off iptables, but at night home rarely open a computer, so can not go to start iptables, of course, you may say, why not cancel timed shutdown iptables, I can only say that

The shell script implements a gentle way to restart the CentOS system _linux Shell

The main purpose is to restart the background of more important processes, if the use of killall-9 forced kill, may cause problems. such as database processes. The code is as follows: Copy Code code as follows: #!/bin/sh If [-Z "$"];

Summary of array operations in shell and bubble sort implementation script sharing _linux Shell

Shell Array Description: Copy Code code as follows: Array variable definition: $ arr= (1 3 6 8 2 5 9 0 7 4) Get first element by default $ echo $arr By subscript access, the second element of the array below, the shell array

A shell script sharing _linux shell that monitors the changes in Linux directories and files

Recently saw a group of people chatting to their server has recently been Hung horse, and then want to use a script to monitor the Web directory changes in real-time files, that is, the directory of additions and deletions to the corresponding log

How to implement core file automatic generation of configuration files _linux Shell

This article describes the implementation of the core file automatic generation configuration method, the following steps: 1. Edit the Environment configuration file, let the shell start automatically set Ulimit Vi/etc/profile ulimit-c

Shell script implementation balances process load into multi-core CPUs _linux Shell

Sometimes, because of the architectural design or other business itself characteristics, resulting in some applications using CPU is very uneven, so business processing concentrated on one CPU, while the other CPU idle sleep. Here is a simple

Total Pages: 541 1 .... 525 526 527 528 529 .... 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.