Using expect to implement automatic interaction of shell scripts
It is very effective for complex interactions and even different processing with different screen output.
And the General Linux, Unix have. It's very easy to use and powerful.
Spawn
In just learning to write shell batch processing, the logical operation, there is no need to base: arithmetic, here to say in the Linux shell simple implementation method.
1. Simple Method
[Chengmo@centos5 ~]$ b=$ ((5*5+5-3/2))[Chengmo@centos5 ~
shell scripts in Linux set environment variables
- -How to set environment variables with scripts
I want to make a script to set up or cancel a set of environment variables, but because the script program's settings for variables disappear after
The shell provides an interface to UNIX systems. Collects input and executes the program according to input. When a program finishes executing, it displays the output of the program.
The shell is an environment where we can run our commands,
Three, Shell script Development Basic Specification
System functions in 1,/etc/init.d/functions action using the method:
Show XXXX, and the right side shows the green OK Word: action "xxxx"/bin/true
Display XXXX, and the right side shows the red
Reprint Address: http://blog.chinaunix.net/uid-25099259-id-3187481.html
VxWorks commands that are commonly used
1. Task-related commandsSP FUNCTION,[ARG1],..., [ARG9]-Start a task, accept up to 9 parameters, default priority 100, stack 20000
EXP detects if there is a SQL injection vulnerability[Email protected]:~# python zabbix.py http://ip:9090/+------------------------------------------------------------+Python zabbixSuccess+------------------------------------------------------------+
I. INTRODUCTIONIn shell programming, circular commands are used to control the execution of certain statements under certain conditions, and in programming languages, loop statements are one of the most basic syntaxes, and are no exception in the
Execute scriptWrite a simple script test.sh:#! /bin/shCD. LSThe shell script uses # notation, which corresponds to the C//comment. However, if # is at the beginning of the first line and is #! (called shebang), the exception is that the script uses
Sometimes in the initialization shell script you want to be able to create a user and specify a password, you can use the Useradd command to achieve this effect:useradd -m -p encryptedPassword usernameParameter description:
-M:
Shell scripting to manage multiple servers at the same time, without the use of ansible, automatic manual implementationSSH does not log on to the Machine execution command (if you have to implement password-free login)ssh 127.0.0.1 ‘ifconfig‘ssh 127
68. Logical judgment in shell script, file directory attribute judgment, if special usage, case judgmentI. Logical judgments in shell scriptsFormat 1:if condition; Then statement; FiFormat 2:if condition; Then statement; else statement; FiFormat
background:The database audit platform for Group self-research has implemented the ability to pull Oracle database performance reports in a single click in a Windows environment.Recently received the small task of the Audit platform development: The
variable names do not add dollar signs when defining variables, such as:# Myname=sxzhouAttention:There can be no spaces between the variable name and the equals sign, which may be different from any programming language you are familiar with. At the
Directory
JavaScript Shell Learn to share
Brief introduction
Installation
Use reason
Summary
JavaScript Shell Learning Sharing Introduction
JavaScript Shell is part of the comprehensive
70. Function in shell, array in shell, demand analysis of alarm systemI. Functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call the name of the small unit
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