1, list_sys_status.shDisplays the following information used by the system:Host name, IP address, subnet mask, gateway, DNS server IP address information#!/bin/baship= ' Ifconfig eth0 | head-2 | Tail-1 | awk ' {print $} ' | Awk-f ":" ' {print $} 'zw=
One. Scenario Description:There are a lot of servers in an environment, each server hostname are different, there are hundreds of servers, if one by one through SSH modification, then for us, the workload is very large, and inefficient, and this
I first paste the script here, convenient for everyone to watch, which is also borrowed from a lot of other big God things, this script is mainly used to monitor the server, users, logs, but also to create backups, and so on. Recently learned shell
Recently in the server tuning process found that the original script is not suitable for the present, so a different way to get.Startup script:#!/bin/bash#PATH =/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin#export PATHJava_home=/
For C in a B C D E F g;do echo $c; Done sequentially outputFor C in a B C D E F g;do tar czvf install.log. $c. tar.gz Install.log; DoneFor C in {a.. g}; do echo $c; Done the same as aboveSeq 1 10 columns of numbersFor i in {1..10}; do echo $i;
some common shell programming (script) commands and statements can be used to meet general requirements. command parameters Received:
Number of parameters:
$#
Parameter values:
The command itself: $ A first parameter: $ $
This script is to monitor all aspects of the system resources, need to change a little, if the network card is not correct, slightly modified, the mailbox to write their own 163 mailbox, the default is an hour to send an email to the mailbox, the
The Linux command is invalid-bash:ls:command not foundAfter a reboot, all basic commands are unavailable and only a few commands are available[email protected] ~]# LL-bash:ls:command not found[Email protected] ~]# pwd/root[Email protected] ~]#
Tag: Service disconnected name with success failure MD5 Code DirectThe purpose of writing a Python script, every time after the Windows edit the file, want to sync to Linux, only to log on to the server, and then use the network copy, the repetition
problem background : PHP reads the REDIS data on the line, which is often unstable, and the data response is sometimes not.workaround : Read multiple times and read all the last unread data until you get it all.This article implements multiple Redis
1.1 Shell some small summary1, 0 wide assertion 2, Print menu 3, getopts option Introduction 4, script query IP geolocation1.1.1 grep zero-width Assertions (0 wide assertion)It means taking out what you want and getting rid of things you don't care
the function of the echo command is to display a piece of text on the display, which generally acts as a hint. the general format of the command is: Echo [-n] string where option n means that the output text is not wrapped, the string can be quoted,
The following is LINUX/HP Unix/aix daily patrol script, you can refer to the rewrite, for their own server.#!/usr/bin/kshSyserrdate= ' date + '%m/%d 'Errcount=0status=Hosts= ' hostname 'Script= ' basenameReport= "/tmp/report.txt"#FS
1 about test testing, see the man documentationThe judgment of an expression(EXPRESSION) #EXPRESSION is True! EXPRESSION #EXPRESSION is FalseExpression1-a EXPRESSION2 #both is true,-o means orWhether the string is empty, equal-N string #the length
first, the questionit is sometimes necessary to use random numbers under the shell to summarize the method of generating random numbers. The computer produces only "pseudo-random numbers" and does not produce absolute random numbers (which is an
This is a case of a client that was processed 1 months ago, which is roughly the first time a certain RAC node instance was restarted, with alert log we can find that the node 2 instance of the RAC cluster has been forcibly terminated, as follows
The script for this lesson is also shared in the share.
Day Fourth: Circular structure
Content outline:
application Example Analysis
For loop
While loop
The principle of the For loop
Achieve effect
Modified according to yesterday's menu.
Try a lot of code on the Internet, finally found this section of success, to retain:
The code is as follows
Copy Code
else if ($GLOBALS [' Cfg_html_editor ']== ' ueditor '){$fvalue = $fvalue = = "? ' ': $fvalue;$code = '
--Install MONGOOperating system for Centos x64Download the. tar.gz file at the official website
The code is as follows
Copy Code
cd/data/Http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.3.tgzTar zxf mongodb-linux-
At the earliest time to do operation, the automation tools are not very hot, and the need for bulk execution will generally rely on pssh, sshpass+ scripts such as the implementation of the bulk of the demand. In 2012, there was a record of the SSH
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.