Find shell script code with the same name but different suffix file names in the directory _linux shell

Because the backstage input colleague, uploads the file the time, to file the same name, but different suffix name, because the file path is very deep, about 10 layers, each layer has dozens of files, so manually find a very troublesome, so write a

Two-segment shell script that counts network card traffic (using ifconfig) _linux shell

Use shell script to compute the Linux NIC traffic, the most critical point in the method: Copy Code code as follows: Ifconfig $eth _name | grep bytes | awk ' {print $} ' | Awk-f: ' {print $} ' The flow of input and output is

Using shell script to realize automatic switching of intranet and extranet to achieve high availability _linux shell

The first description of our configuration file, are similar format, if the intranet is 192.168.0.3, the extranet is 123.123.123.123, the configuration file is as follows: $db [' salver '] [' hostname '] = ' 192.168.0.3:3306 ';$db [' salver '] ['

A summary of the method of shell script passing parameters _linux Shell

svn

First, receive the fixed length of the parameter Copy Code code as follows: [Root@svn shell_example]# Cat params.sh #!/bin/bash #传参测试脚本 echo "My name is ' basename $ ' I ' called as $" echo "My I-parameter is: $" echo "My

Shell script reads text file line by row (without changing text format) _linux Shell

There are many examples of shell script-reading text files on the web, but they don't tell the whole story, only half of it. For example, read a text line from a testfile file in the following format: Copy Code code as follows: $ VI

Shell script realizes whether the rsync data is transmitted over the _linux shell

Today there is a server A to transfer all the Web site program to another server B up, but away from work time is only 1 hours, in order to work on time, simply wrote a shell script to monitor whether there is transmission, I first in the server a

CPU clock Prefetch instance code share _linux shell

Test the effect of prefetching, using the CPU to always view the effect. According to the experiment found that the prefetch address in the address before the use of the 10 lines around the code at the effect is better! Copy Code code as

A bug analysis of case condition control statement in shell script _linux shell

In the shell script, you find a problem with the case statement.This method of specifying lowercase letters [A-z] and uppercase letters [A-z] is no use. The following conditions occur: Copy Code code as follows: [Root@station1 ~]#

Using Linux timerfd_create to implement Timer sample sharing _linux Shell

Timer_poll.h Copy Code code as follows: /* * File:timer_poll.h * Author:administrator */ #ifndef Timer_poll_h#define Timer_poll_h#include #include #include #include #include #include #include #include #include #include #include

Shell Implementation Force free memory script share _linux Shell

The company server has been dying for the last two days because of the full memory usage. Really can't stand the old call room to help people to restart, specifically wrote a script to release the memory, of course, this server is not too important,

Use the shell script to find the site's empty pages and 404 error pages _linux shell

A note earlier, just recorded two lines of code, put out the words is also a low quality page, so set up in order to only be visible, tonight to add. Remember when the scene should be submitted sitemap when Baidu old hint of the wrong URL, cause

SVN server startup and SVN server restart, stop, and other operations script sharing _linux Shell

svn

Copy Code code as follows: #!/bin/bash Case "$" in Start Svnserve-d-r/svndata Svnport= ' NETSTAT-NATP | grep Svnserve | Awk-f: ' {print $} ' | awk ' Nr==1 ' If [$svnport-eq 3690] Then echo "SVN Server already runnning. port:3690 " Else

Ways to process JSON data at the shell command line _linux Shell

Because I've been working on some JSON data formats recently, I finally found JQ this great tool after a search. JQ allows you to manipulate JSON directly under the command line, including slicing, filtering, converting, and so on.Let's use a few

Shell script implementation upload zip compressed file to FTP server _linux shell

Copy Code code as follows: #/bin/bash # Creator:lihuibin # date:2014-03-10 16:45 # Desc:upload file to FTP Hosts= "192.168.56.100" Port=21 User=test Pass=testpwd Work_path= "/var/www/cms" Packname= "Publish" #hosts =$1 #port =$2

Shell script to get the domestic major carriers network segment script sharing _linux Shell

pow

The Asia Pacific Network information is recorded here, updated every day. Http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest The following script will edit this text, output several major network segments of the domestic operators.

Shell Script Test command uses summary and instance _linux shell

The test command in the shell is used to check whether a condition is valid, and it can be tested in three aspects, such as numeric value, character, and file. Numerical test Parameters Description -eq is equal to

Aliyun host a key to install lamp, LNMP environment shell script sharing _linux Shell

Aliyun host one-click Installation lamp,lnmp, automatic installation script, shared by Aliyun host One-click installation package Download address: Click to download 1, Aliyun sharing a key installation Lamp,lnmp, this installation package

Some special symbols and functions common in shell scripts _linux shell

When writing a shell script, we need to use a variety of special symbols, through these special symbols can make us write code more concise and efficient, here to the summary: 1, {} curly braces:Usage One: Wildcard extensionEg:ls

Shell scripts convert files from GBK to UTF-8 encoded _linux shell

Shell script: #!/bin/sh # # # Convert file from GB2312 to UTF-8 # path= "$" unset opt if ["$" = "Force"]; Then opt= "-c-s" fi if [-Z "$path"]; Then echo "Nusage: $ n" elif [!-e "$path"]; Then echo "Nerror:destination: $path does not exist.n"

Linux Shell if [-n] Correct use method

if [str1 = str2] When two strings have the same content, the length is trueif [str1! = str2] When string str1 and str2 are not equalIf [-N str1] is true when the length of the string is greater than 0 (string non-null)If [-Z str1] is true when the

Total Pages: 541 1 .... 263 264 265 266 267 .... 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.