WshShell objects
ProgID Wscript.Shell
FileName Wshom.ocx
CLSID f935dc22-1cf0-11d0-adb9-00c04fd58a0b
IID f935dc21-1cf0-11d0-adb9-00c04fd58a0b
The following table describes the properties associated with the WshShell object.
Attribute
#!/bin/sh #本脚本为守护进程, , automatic restart process Function check_and_kill_and_start () {log_file=$1 If a process zombie is found
Name=$2 dead_duration=$3 # echo "check the progress " $ps _name ymd=$ (date +%Y-%m-%d) Log_file=${log_file}${ymd}.log
The company server has been dying for the last two days because of the full memory usage. Really can't stand the old call room to help people to restart, specifically wrote a script to release the memory, of course, this server is not too important,
The way to get timestamps in the shell is: date-d "$currentTime" +%s
If you want to convert a date to a timestamp, you would do the following:
1. Get the current time
Currenttime= ' Date ' +%y-%m-%d%h:%m:%s '
2. Convert date to time stamp
When you download the SVN code on a Linux server and sync it to a web directory, you'll need to clean up the folder and add a little security to your safety.Script content:del_svn.sh
The code is as follows
Copy Code
Variable
Get the native host name
#hostname
Get the system version number
#uname-R
Get CPU Type
Get the CPU working frequency
Cat/proc/cpuinfo
Get Memory
The following is a 1-2-day study of Shell learning notes
————————-I'm the separator —————————
Hardware to perform, operating between the kernel and the hardware.
The command parser.
Component elements of a shell script
System
Introduced
The grep command in a Linux system is a powerful text search tool that uses regular expressions to search for text and print matching rows. The grep full name is global Regular Expression Print, which represents the global regular
Objective
I believe a lot of people have had this experience, when modified a pile of bugs, to update the code to the server, at this point, the simplest way is to upload the project file all at once, this way feasible, but not to take. Why, you
To turn the "functions in" chapter into a "library for", "scripts, extract all the functions and Concatenat e them into one of the big file. If We call this file library.sh, a test script so accesses all of the functions might look like this:
An array is a set of elements of the same data type arranged in a certain order, that is, a variable of the same type is named with a name and then numbered to distinguish their set of variables, which is called an array name, and the number is
Starting the system as fast as possible is very important for automation equipment. The system is able to start at a time that the user cannot perceive, which means that the power supply can be completely disconnected when no work is needed, rather
Determines whether a specified script is a syntax error, and if there is an error, prompts the user to type Q or Q to ignore the error and exit, and any other key can open the specified script via vim;#! /bin/bashScript_file= "./test.sh"Sh-n $script
Progressive Web Apps is fast and installable, which means it can be used in an online, offline, intermittent, or slow network environment. To achieve this goal, we need to use a service worker to cache the application shell to ensure that it is
Linux prohibits root users from logging on through sshRoot users are prohibited from logging on through ssh by operating the sshd_config configuration file.1. Open the ssh configuration fileVim/etc/ssh/sshd_config2. Find the following line of text
In the production environment, hosts may be modified by another administrator or user. allow allows more ip addresses to log on to machines. To facilitate unified management, you can change the allow and deny files to the default settings when
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