This article mainly introduces the Linux Shell Script series (v): Mathematical operations, this article explains the use of Let, (()) and [] arithmetic, using expr for arithmetic operations, using BC for arithmetic operations three ways, the need
What is a shell script.
Shell scripting (English: Shell script) is a computer program and text file that consists of a series of shell commands that operate after the Unix shell literal translation of its contents. Designed as a scripting language,
1. Use the system $RANDOM variables
fdipzone@ubuntu:~$ Echo $RANDOM
17617
The range of the $RANDOM is [0, 32767]
If you need to generate more than 32767 random numbers, you can do so in the following ways.
Example: Generating random numbers
Abstract:
1) The Linux shell uses let, [], (()) Three operators to manipulate shell variables for simple basic operations;
2) The Linux shell uses expr and BC two programs to achieve advanced operations;
1, basic operation of Linux
When you use the Scrapy Shell to test a Web site, it returns a bad request, so change the user-agent header information and try again.Debug:crawled ( (referer:none)However, how to change it?Use the Scrapy Shell--help command to see its usage:The
Https://www.jb51.net/article/58799.htmIn the absence of nagios monitoring software, as long as the server can be on the Internet, you can send e-mail to remind the Administrator of the system load and CPU usage.One, install Linux under a mail client
Using Nmap to scan the surviving hosts in batches
Knowledge Reserve: Grep,nmap
First, install Nmap1. Install the compilation environment[[email protected] nmap-7.01]# yum install gcc g++ gcc-c++ -y2. Download Nmap using
A Shell introduction: 1 descriptionThe shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.A Shell is an application that provides an interface through which users
(1) difference between single and double quotes in the shell?? A= "Www.jfedu.net"?? b= ' $A '? Echo $BComments:?Assign the www.jfedu.net to variable A, assign the contents of variable A to the variable B, print out the result of the variable B, and
Shell scripts fall into three categories: logon scripts, interactive scripts, non-interactive scriptsOneThe logon script is similar to the logon script in the computer settings under Windows and the collection of logon scripts under Account settings
When using HoloLens, the shell is made up of the world around you and holographic images from the system. We make this space a mixed world (mixed worlds). The shell contains a Start menu that allows you to place holographic images and applications
#!/bin/bash#Created by Ley on 2014-11-14#Testing the Paramtersecho "The Compleate list is%s\n" "$$"echo "The Compleate list is%s\n" "$!"echo "The Compleate list is%s\n" "$?"echo "The Compleate list is%s\n" "$*"echo "The Compleate list is%s\n"
One, single and double quotation marksFirst, both single and double quotes are meant to solve the problem of having spaces in the middle.Because the space is in Linux as a very typical delimiter, such as String1=this is a string, so execution will
I. Functions in the shell[Email protected] aming]# cd/root/shell/aming[Email protected] aming]# vim fun1.sh//need to be aware that function names cannot conflict with some keywords in the shell#!/bin/bashfunction InP () {Echo $ $ $ $#}INP 1 a
Use SSH (Secure SHell)
1. What is SSH?
2. How does SSH work?
3. Why do I need to log on using the second method?
4. experiment between Windows 7 and ubuntu Virtual Machine
4.1 ssh password connection
4.2 ssh key connection-
When deploying a task, one of the necessary processes is to send some files, such as the installation package, to a large number of servers. Although yuge's script is available, it is a python script written through the ssh and scp functions
Name: satool PS: it can be called a "Silly Rabbit" by a colleague ")
Function: This script can run commands in batches, copy files, and perform simple logon. You can quickly log on without remembering the specific IP address of the application
Learning bash notes-debugging shell programs and learning bash shell
In shell, the simplest debugging assistant outputs the echo statement. Many echo statements can be put into the code for debugging, but it takes enough time to locate
The
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.