Shell script--dns Automatic deployment

Detailed description View:(a) Play with Me Linux network services: DNS service--bind (/etc/named.conf,/var/named) settings implementation and interpretation1#! /bin/Bash2ip="10.10.10"3rip="10.10.10"4dn="gr.org"5Name="10.10.10.10"6 7Cat

Shell problem case and three Musketeers awk and sed settlement practice

20150418 Weekend Quiz raw data: 17/apr/2015:09:29:24 +080017/apr/2015:09:30:26 +080017/apr/2015:09:31:56 + 080018/apr/2015:09:34:12 +080018/apr/2015:09:35:23 +080019/apr/2015:09:23:34 +080019/apr/ 2015:09:22:21 +080020/apr/2015:09:45:22 +0800

Linux shell adds or subtracts an hour or a minute from the specified date

Subtracts the specified day from the specified date[Email protected] init_env]$ date-d "20150416 3 days" + "%y%m%d%h"2015041912Adds the specified hour to the specified date[Email protected] init_env]$ date-d "20150416 3 hour" +

Linux Shell Script (i)

first, the initial knowledge of the scriptShell: A class of interpreter between the system kernel and the user.Scripts: A class of files that are executed in a preset order using a specific languagebatch, macro, and interpreter programsTo create a

Shell introduction and Getting Started

1. What is bash?Bash is a Unix shell written for the GNU program and is the default shell used by many Linux platforms.The shell is a command interpreter, an insulating layer between the operating system kernel and the user. At the same time, the

Linux Learning Notes-The 12th lesson-shell Script's regular expression (i)

First, Grep,egrep,fgrep1) grepFormat: grep [options] [mode] [file name]Common options:-N: Display line numbers and matching rows-V: Reverse match-C: No matching rows are displayed, only the number of matching rows is displayed-I: Ignore case-R:

Shell Basics Exercises

"Shell Script Basics"Create a script#vim 1.sh*********************#! /bin/bashecho "Hello world!"*********************#chmod +x 1.sh#sh 1.shHello world!Extensions and command extensions still work within double quotation marks.#echo "Can I have a

Shell Scripting Practices

1. The script determines whether the command output is empty(1) Determine if the string is emptyIf ["$str" = ""]If [x "$str" = x]If [-Z ' $str '] (-n is not null)Note: You have to double quotation marks, or some commands will be error, form a good

Shell Summary (while)

#!/bin/bashwhile ifs=: Read name1 name2 name3 name4#ifs is the split symbol specified when reading from a file, assigning the contents of a to the corresponding variable in separate sections. Do echo $name 1 ' | ' $name 2 ' | ' $name 3 ' | ' $name 4

2015/04/08 Shell Basics-1

PS: Red font is an important part, look carefullyFirst, Shell features1. History view the command record, default records 1000;[Email protected] ~]# history 1 vim/etc/hosts 2 Ifconfig 3 cd/etc/sysconfig/network-scripts/ifcfg-4

Linux Shell Test

(EXPRESSION)Expression is true expression true! EXPRESSIONExpression is false expression falseExpression1-a EXPRESSION2Both EXPRESSION1 and EXPRESSION2 are true both trueExpression1-o EXPRESSION2Either EXPRESSION1 or EXPRESSION2 is true one of

Shell Tips--color output

The shell, as a scripting language, is a skill that every Linux administrator must master, sometimes adding some background color to the output in the shell, making the script a little more aesthetically pleasing, and using echo to output a string,

Shell error ' @ ' localhost ' (using password:yes) ' root '

A simple paragraph was written in the shell.Energy.sh content:#!/bin/Bashhost=127.0.0.1User=******passwd=******dbname=******TableName=Device_value_300sct007p01_yearmonth=$(Date+%y-%m) sqlstr="INSERT INTO Device_value_300sct007p01_year (id,year,month,

The use of shift in the Linux shell

Position parameters can be usedshiftcommand to move left. Like whatshift 3Indicates that the original$4Now become$1, the original$5Now become$2Wait, the original.$1、$2、$3Discarded$0Do not move. With no parameters.shiftcommand is equivalent toshift 1。

Linux Learning Shell Script

First, write a script, let the user input: 1.first name 2.last name, last displayed on the screen: Your full name is: Content#!/bin/bashread-p "Please input your firstname:" firstnameread-p "Please input your lastname:" LASTNAMEECHO-E "your ful L

Installing the LNMP environment with shell scripts

#/bin/bash#----------------------------------------------------------------#data =2015-03-19#auth: Tongcheng#Nginx version:1.6.2#Php: 5.4#Mysql: 5.5.0#-----------------------------------------------------------------#删除关于安装软件的包Delete ()

Array Bash shell

Http://www.cnblogs.com/chengmo/archive/2010/09/30/1839632.html#!/bin/The bash# script detects an offline host opportunity to send an email notification that can be run all the time. # Please set mail gatewany IP lastip Four items according to your

Shell script sorting (Bubble Sorting), shell script sorting bubble

Shell script sorting (Bubble Sorting), shell script sorting bubble #/Bin/basha = (9 84 51 0 345 1 2 34 1 0) # define an array temp = for (I = 0; I The above is sorted by a custom fixed array, and the following is a user-defined input array.

Test and content replacement of shell variables, replacement of shell Variables

Test and content replacement of shell variables, replacement of shell Variables Reference: laruence's private house dish-Linux BASICS (Third edition). In Chapter 11th of the Linux BASICS (Third edition, the final example illustrates '-', '=', and '

Execute the system command and write the shell script that writes the output to the log file,

Execute the system command and write the shell script that writes the output to the log file, This is probably the requirement. Run the usysfault command on the aix system to retrieve the fault light information. However, it seems that only the

Total Pages: 541 1 .... 317 318 319 320 321 .... 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.