Shell nesting expect execute command in CENTOS6

System: CentOS 6.x 1. Install expect first The code is as follows Copy Code Yum-y Install expect 2. Script content: The code is as follows Copy Code Cat

Linux shell Script monitoring site 80 port and site is normal

Monitoring website 80 Ports Many times we do not know whether the site 80 port is normal, of course, my previous Shell monitoring site status (continued) This article can also monitor the site, here is just to provide you with another way to

Use the shell to get the date n days before the specified date _linux shell

First, create test files test.sh #!/bin/sh ./etc/profile # Parameters: # Args[0], data date, date format Yyyy-mm-dd # Take 30 days before the date function Get_date_ 30daysbefore () { sec= ' date-d $ +%s ' sec_30daysbefore=$ ((sec-86400*30))

Instructions and examples of Linux AR commands _linux shell

The AR command can be used to create, modify, or present a single module from a library. A library is a separate file that contains other files that are organized according to a particular structure (referred to as member of this library file). The

Linux Common Command Complete (ultra-comprehensive) _linux shell

System Information Processor architecture for arch display machines (1)UNAME-M processor architecture for display machines (2)UNAME-R Displays the kernel version being usedDMIDECODE-Q display hardware system parts-(SMBIOS/DMI)Hdparm-i/dev/hda lists

Linux Operational Dimension Common command _linux Shell

Own small website runs in the Aliyun ECS above, occasionally also analyzes own website server log, looks at the website the amount of visits. See if there's any black-and-wide sabotage! So collect, organize some server log Analysis command, we can

Arrays and traversal in the DBA's Linux shell

dba

How arrays are declared array= (element1 element2 element3 .... elementn) array= (192.168.1.91 192.168.1.92 192.168.1.93)2. Array reads# echo ${array[index]} # echo ${array=[0]}# echo ${array[2]}3. Traversing all arrays# echo ${array[@]}# Echo $

Shell Loop Statement Application Example

1 for statementSyntax formatFor variable in value (or loop condition)DoCommandDoneSend mail to multiple users#! /bin/bashDomain=163.comFor user in Tom Hom JemDoMail-s "Happy New Year" [email protected] $domain DoneTo print 9*9 multiplication

Using the shell to automate script files under Linux

The following instance is used in the Centos6.5 64-bit operating systemOne, the regular copy fileA. Create the tomcatback.sh file in the/usr/local/wfjb_web_back directoryFile contents:#将tomcat中的应用wfjb_web copied to the/usr/local/wfjb_web_back/tomcat_

Shell Script Auto-Configure send QQ mail

Every time I write a script under Linux has the ability to send mail, but the configuration under Linux always forget, so this time wrote a small script, record, next time you want to configure the script to run the line. QQ mailbox is used

Log Analysis _ use Shell full log analysis case

First, demand analysis1. Log files are generated each day (the log files need to be uploaded to HDFs) 2. Analyze the fields included in the log file: Access IP, access time, access URL, access status, access traffic3. There are now "yesterday" log

Shell scripts to monitor CPU, memory, and hard disk utilization

#!/bin/bash#createdate: 2016-11-15Date= ' date+%f ' "%h:%m"ip= ' Ifconfigeth0 | awk '/inet addr/{print $} ' | Cut-d:-f2`Echo-e "\033[032mdate: $Date \nhost: $IP \n\033[0m"echo-----------------CPU----------------Cpu_us= ' Vmstat|awk ' {print $13} '

Simple difference between single quotes, double quotes, and unquoted in a Linux shell

Brief summary:Single quotes:What you can say is what you see is what you get: the contents of a single quotation mark are output as is, or what you see in single quotes is what you output.Double quotes:Output the contents of double quotation marks,

Shell Scripting Raiders (Reading notes)--1.11 command substitution and the role of child shells

1.11.1 command SubstitutionUse the reverse quotation mark "'" (on the key of the wavy line) or $ () in Linux to perform command substitution. Generally more intuitive and more convenient to knock in $ (). [Email protected] tmp]# echo Can You tell me

Automate the release of Jenkins at specified times by shell+atd scheduled tasks

Our company is through the Git+jenkins+shell+docker to achieve automated update release.Here I say how I use the SHELL+ATD service, at 21:00 in the evening to complete the lead account of a project on-line operation. Note that this on-line project

Linux Shell Summary

ls/usr/bin/The info# path Operation dirnamebasename# "" and "and" in the shell variable "" allows references to other variables by means of "" prohibit reference to other variables, as ordinary characters ' output of the command execution to the

Shell branching and looping

1. Common environment variables variable name description example path finds a collection of paths for all external commands. If you do not have a PATH environment variable, all external

Basics of 1-22-shell Scripts

1.1 Shell Script Writing specification 1.2 Variable and special variable application 1.3 Local variables and global variables 1.4 Test-piece expression ------------------------------------------------------ Background: In some complex Linux

Shell Practice-sort Sort by detailed

There is a log file on the server Guest.log, each line contains: ID number, name, Internet café Name, the most recent Internet time, Internet hours, the amount of consumption, now requires the file of each row of the sixth column and the second

KVM One-click Shell automatically generates a Windows virtual machine with unattended operation scenario (STEP1)

KVM One-click Shell automatically generates a Windows virtual machine, unattended operation scheme is divided into four steps to complete the joint;The first step: Start the startup script, so that the machine can be executed at the start of the

Total Pages: 541 1 .... 131 132 133 134 135 .... 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.