Shell script gets the local network card IP, MAC address, subnet mask, DNS IP, extranet ip_linux shell

#/usr/bin/env Bash # Name:get_network_info.sh # author:purple_grape # This was a script to gather network inf Ormation of your Linux system. # Test under Ubuntu 10.04 only. #---------------------------- nic=eth0 mac= ' lang=c ifconfig $NIC | awk '/

Shell to take today, yesterday, day before yesterday's time operation code _linux shell

1. Take today's time Copy Code code as follows: $date-D "Now" +%y-%m-%d 2. Take yesterday time Copy Code code as follows: $date-D "Yesterday" +%y-%m-%d $date-D "1 days ago" +%y-%m-%d # # D,--date=string

Shell script If Else statement summary _linux Shell

Unlike Java, PHP and other languages, the process control of SH is not NULL, such as: Copy Code code as follows: if (Isset ($_get["Q"])) { Search (q); } else { Doing nothing } ?> You can't write this in Sh/bash,

Use shell script to analyze Web log statistics PV, 404, 500 and other data _linux shell

The following script can count the total number of visits to the site and how many times 404,500 occur. Statistics, we can combine the monitoring of the Bora record, and then you can see whether the site traffic anomaly, whether there is an attack,

Linux-shell script command: Introduction to SED command

[SED Introduction:] Sed is a good file processing tool, which itself is a pipe command, with the Behavior unit processing, can be used to add, select, replace, delete data rows and other operations. SED command line format: sed [-nefri] ' range

Shell script for detecting network segment online hosts

Job Four: Write a script: Implement Ping Class C network segment, Class B network segment and all hosts in Class A network segment; The network segment address lets the user input, moreover uses the script to judge the network segment type;

Execute SQL statement action in shell script

This article mainly describes the shell script in the execution of SQL statements 5 ways to operate MySQL, this article explains the SQL statement embedded directly into the shell script file, the command line calls a separate SQL file, using the

Process Control statements in shell programming

1. Conditional selection: If statement① Single Branchif judgment condition; then condition is true Branch code FI② Dual Branchif judgment condition; Then condition for true Branch code else condition for false Branch code FI③ Multi-Branchif judgment

Shell programming interview must be 30 questions

Source: "Learn Linux with old boys" shell programming combatInterview Question 1: mass production of random character filenamesCode:[email protected]:/home/dell/shell# vim creat_ten_htmlfile.sh #!/bin/bash#date: 

The difference between the login shell and the Non-login shell

"Thedifference between the login shell and the Non-login shell " Login Shell: A full login process is required to go to bash. That is, by entering the account and password to log into the system, the obtained shell is called the login shell

How do I get the return value of the Shell function and the return value of the shell command?

1. Gets the return value of the Shell function call:#!/bin/sh info () { cat jlb.sh} res= ' info ' echo ' state: ' $?echo ' res: ' ${res}description : res='info' This behavior calls function info, inside the symbol ' is not a single argument,

Shell Monitor lists 10 cpu-intensive processes in 1 hours

The script reads as follows:-------------------------------------------------------------------------------------------------------#!/bin/sh#定义变量secs=3600Unit_time=60stepts=$ (($secs/$unit _time))echo CPU usage ...;For ((i=0;iDoPs-eo COMM,PCPU |

Dynamically analyze Maillog logs with shell scripts to disable malicious IP firewall

Dynamically analyze Maillog logs with shell scripts to disable malicious IP firewallSystem environment: Centos 6.5 x64Postfix mail system installed, found Maillog too many "SASL LOGIN authentication failed" Junk IP address. This script is used to

Shell Third: basic syntax

Directory one, what is shell script two, variable three, operator four, flow control five, function    first, what is shell scriptStacking OS commands into executables, executing the OS commands in the text from top to bottom, is scripting, and with

12th. Shell script writing and common face Test (III.)

Directory of this chapter:650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/97/5E/wKiom1kuG2Dij8H6AAAuNhrwFhc739.png "title=" QQ picture 20170531092359.png "alt=" Wkiom1kug2dij8h6aaaunhrwfhc739.png "/>12.21 ftp Download file#!/bin/bashif [$

Arithmetic operations and conditional test statements in shell scripts

Shell scripting implements arithmetic operations that are:+,-*、/Modulo operation%exponentiation * * or ^Special Enhanced arithmetic operations:++ --Arithmetic Operation method1.let command var= arithmetic expressionThe arithmetic expression is first

Shell script implementation of illegal IP landing automatic alarm "turn"

The security and stability of the server is the goal that every operation and maintenance want to achieve, after all, once the website traffic is big, access is high, there will be some boring people to attack, to help detect the vulnerability is

Play the shell command line

Move cursor shortcut keysCtrl+f move forward one characterCtrl+b Move backward one characterCTRL + A moves to the beginning of the current homeCtrl+e move to the end of the current lineAlt+f move forward one wordAlt+b Move backward One wordCtrl+l

Shell Introduction: What are the two ways to execute a shell,shell command

The shell itself is a program written in C, which is a bridge for users to use Unix/linux, and most of their work is done through the shell. The shell is both a command language and a programming language. As a command language, it interprets and

Shell sort sort Big discussion

Transfer from http://roclinux.cnThis original article belongs to "Linux greenhouse" blog, the blog address is http://roclinux.cn. The author of the article is rocrocket.===[Start of body]Sometimes learning scripts, you will find the sort command

Total Pages: 541 1 .... 90 91 92 93 94 .... 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.