This article mainly introduces 2 methods of referencing and invoking another script file in the shell script, this article introduces the syntax of the two methods, then gives the actual usages and some places to pay attention to, the friend who
Enun Remote Cmdshell, like to play Cmdshell friends can refer to the next
Effect as shown:
Copy Code code as follows:
'============================' Enun Remote Cmdshell v 1.0'============================
Option Explicit
CONST
Because Nginx is a high-performance http and reverse proxy server. Nginx has a strong advantage in reverse proxy, rewrite rules, stability, static file processing, memory consumption and so on. Therefore, most of the Web services on the company's
In the shell, if you need to switch users, and then run some commands as a specified user,
For example, you need to write a line of "Oracle_base=/oracle/app" to a. bash_profile file with an ORACLE user.
You can use the following statement
The new company because of some business reasons have good hundreds of group win machine installed MySQL license login More trouble, simply write a shell automatic authorization script, save reuse.#!/bin/bash#author [Email protected]function
by Francis_hao Jul 5,2017Getopts is a built-in command for the shell.OverviewGetopts optstringname [args]Optind,optarg,opterrDescribeGetopts is used by the shell program to analyze positional parameters,optstring contains the option characters that
Symptom: In terminal direct Cd/var normal, execute in shell script is error. The reason is that the script is written under the Windows platform, and the line break is different from Linux, causing the script to not execute correctlyThe cause of bad
Version 1.0, refer to some articles on the web to be structured. Later intends to continue to revise. Complete a shell development specification that suits you.Last modified: 2017.6.25I. Naming specification 1, version and operating parameters1)
6.1Given a user, determine if its UID and GID are the same "^ $USERNAME \>" (first word at the beginning of the line)If it does, the user is displayed as "good guy";#!/bin/bash#USERNAME =user1If!grep "^ $USERNAME \>"/etc/passwd &>/dev/null;then user
Shell Test CommandThe test command in the shell is used to check if a condition is true, and it can be tested in three aspects of numeric, character, and file.Numerical test
Parameters
Description
-eq
Equals
1. Gradle Daemon is also the Gradle daemonGradle needs to run in a Java virtual machine, each execution of the Gradle command means that a new Java Virtual machine is started, loads Gradle classes and libraries, and finally executes the build. In
IfconfigThis command is consistent with the "ipconfig" function of windows for displaying details such as network interfaces, subnet masks, and so on.Ifconfig the left column is the network interface name, which occupies 10 bytes, and several
Objective: To monitor the operation of Nginx and NFS services in the cluster, such as any service exception, send an email to notify the userCondition: 1. Host and the IP address of the sub-machine, hostname has been determined;2. The host and the
One: Hello WorldCreate a new file, named after the. sh suffix. Each bash file begins with the first row of table names file type: #!/bin/bashThen enter the code below.For example, the output Hello World:#! /bin/"helloworld"Run Bash file:./file name.
In a shell script, the $ A is typically used to display the name of the script, which displays the path name of the script when not using basenameFor exampleCat test5.sh #!/bin/bash # Testing the $ parameter echo the zero parameter is set
Arrays ArrayVariables: Storing the memory space of a single elementArray: A contiguous memory space that stores multiple elements, which is equivalent to a collection of multiple variables that support sparse formatting, which is a discontinuous
Recently, there is a requirement in the project: when the foreign currency funds in the system are dispatched, a TXT file is generated and the TXT file is sent to another system (Kondor). Generated files naturally use Outputstreamwirter, send files
JavaScript uses the Wscript.Shell object to execute the. bat file and the cmd commandHttp://www.cnblogs.com/ZHF/p/3328439.htmlWscript.Shell (Windows Script Host Runtime Library) is an object and the corresponding file is c:/windows/system32/
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