Linux 2 commands for checking TCP connections _linux shell

1 detect the number and status of links to the Web server: Netstat-ant|awk ' {print $ \ t ' $} ' |grep:: FFFF: ' |sed-e ' s/::ffff://'-e ' s/:[0-9]*//' |sort|uniq-c| Sort-rn|head-10 Results:122 125.162.71.199 time_wait79.119.125.43

Validate user input arguments the legality of the shell script _linux shell

Today's example is used to validate the legality of the parameters entered by the user, and the program is not complicated, as follows: #!/bin/sh # validalphanum-ensures that input consists only of alphabetical # and numeric

One day a shell command Linux text Operation series-WC command detailed _linux Shell

Name WC is a tool for statistics, all spelled as: Word count (Word statistics) Instance: 1. Statistics of rows $WC –l File 2. Statistics of words $WC –w File 3. Statistics of characters $WC –c File 4. Number of characters in the statistical

The implementation method of shell randomly extracting several rows from file _linux shell

Shuf-n5 Main.txt Sort-r Main.txt | Head-5 awk-vn=5-vc= "' wc-l file '" ' Begin{srand () while (n While read Line;do echo "$line $RANDOM";d One Options for the Shuf command: -E,--echo: treat each parameter as an input line-I,--input-range=lo-hi:

Shell time operation and calculation method _linux Shell

In recent time, when dealing with shell scripts, encountered time processing problems. The addition and subtraction of time, as well as the calculation of timing. I. Time Plus and minus The way to do this is to turn the base time into a timestamp,

Shell script implementation monitors the running state of a specified process _linux shell

In the previous blog, once wrote the implementation of automated test procedures, now developers need to know the process of being tested (this refers to the main process running on Linux) before the abnormal exit of the process state, such as

Code _linux Shell to prevent repeated execution of shell scripts

For example, you might want to refer to the following implementation for a script that requires only sequential access to a resource, such as a disk file. Copy Code code as follows: #!/bin/bash # # File locking using Bash. # ver 0.1.6

Introduction to Shell comparison operations _linux Shell

Shell string Comparisons, judging whether it's a number Binary comparison operator, comparing variables or comparing numbers. Note the difference between numbers and strings. Integer Comparisons -eq equals, such as: if ["$a"-eq "$b"] -ne is

Introduction to the search and replace of shell Script Learning guide _linux Shell

3.1 Find textgrep: Use POSIX-defined basic regular Expressions (BRE).Egrep: Using an extended regular expression (ERE).Fgrep: Fast grep. Use the optimized algorithm to match a fixed string rather than a regular expression. The 1992 POSIX standard

Shell custom Function and parameter invocation parsing _linux shell

One, the definition function Copy Code code as follows: function fname () { statements; } Or Copy Code code as follows: FName () { statements; } Second, call function You can call a

Concurrent Database Stress test shell script code _linux Shell

Copy Code code as follows: #!/bin/bash #********************************# #并发后台运行fun # #for Wanggy 2012-01-25 # #note: # #fun_num Fun function Background Run number # #sql_num How many times per function SQL runs # #**********************

Linux shell array creation and use techniques _linux shell

The Linux shell is much more powerful in programming than in Windows batching, whether in loops or operations. There is no comparison of data types. The following is a summary of how an individual operates on an array while in use. 1. Array

Linux Shell view current extranet Ip_linux shell

Function Fly Shovel is simpler, just get the extranet IP. Some sites are processed for Curl UA. Meet their own collection of addiction, collected a lot can be used to query the Internet IP URLs and methods. #国内某网站的接口, only return IP Curl ip.665

Shell.Application Five ways to execute a command summary _vbs

When the old horse wrote this version, I tested a simple reproduction of two 2003 version, when it is easy to use. I guess it's probably about 2003 dozen ms06014 patches. Kyo the solution at the freezing point forum, I studied this component this

Shell generates a simple format XML instance _linux shell

Here's the shell code:create_xml.sh Copy Code code as follows: #! /bin/bash #author: Dengzhaoqun#date: 201202/14 Outfile=outTabs=0 Put () {Echo ' ' >> $outfile} Put_head () {Put '? ' ${1} '? '} Out_tabs ()

The control method of Linux shell command execution order _linux Shell

&&Command 1 && Command 2: If this command executes successfully && then execute this command.[Jb]/usr/xxxx/ytcclb>ls-l Test.sql-rwxr--r--1 xxxx Group Nov 14:12 Test.sql[JB]/USR/XXXX/YTCCLB>CP test.sql Test.bak && echo "Coping file ok!"Coping file ok!

function return value exceeds problem in shell _linux shell

1. Preface Almost six months did not write a blog, deserted for a long time, the work of the chores too much, their own more and more lazy. In order to spur their own growth, or adhere to write a blog, record their growth. 2. Introduction to Shell

Variables in the shell using a summary _linux shell

svn

The definition of a variable can only begin with a letter and an underscore, case-sensitive, and may contain a numeric letter underline. See Official Handbook Copy Code code as follows: [Root@svn shell_example]# yourname= ' Linux ' [

For and while loops in the shell detailed summary _linux shell

One, for loop1. Digital Segment Form Copy Code code as follows: For i in {1..10} Todo Echo $i Done 2. Detailed list (character and number of items are not many) Copy Code code as follows: For File in 1 2 3

Linux shell script implementation download end shutdown _linux Shell

With Mint for some time, download basic with Firefox, and sometimes download a few g of the game. But Firefox didn't find the option to download the shutdown. In this reason, wrote this. download_shutdown.sh #!/bin/bash # Created by: Demo #

Total Pages: 541 1 .... 415 416 417 418 419 .... 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.