First, use '. ' Perform1. Contents of the file:a.sh#!/bin/sha=2echo a= $ab.sh#!/bin/sh./a.shecho a.sh:a= $a2. Add executable permissions# chmod +x a.sh b.sh3. Running#./b.sh a=2a.sh:a=It can be seen that a in b.sh does not get the A variable in a.sh,
/path/to/scriptname opt1 opt2 opt3 opt4 $0 $1 $2 $3 $4Is that clear enough for you? Run the script file named "$" variable, the first parameter is $ ~ ~ So, as long as we use in script, we can easily release some
Course Outline:1. Shell FeaturesOrder history!! !$!n! characterTab key to complete file path or commandAlias a= "B" Unalias AWildcard * Matches 0 or more characters? Match one characterinput and output redirection;, >>, , 2>>Pipe symbol |Job Control
In Linux, the execution of a script can help us save a lot of time, for the execution of the script it is understood by the individual, it is the same as the beginning of the file #! Bin/bash through the VI editor to create a new executable file,
a few powerful commandsShare some shell usages and scripts that you may not know about, simple & powerful!Before reading the following sections, it is strongly recommended that the reader open a shell experiment that is not da Lu Huo in the shell
What is a Shell?Outline "Preface " 1. Shell Introduction 2, Bash function introduction 2.1. Record command history 2.2. Command and file name completion 2.3. Aliases2.4. pipe character/redirect 2.5. Shortcut keys 3. Bash
One of the basic features of the bash shellFirst, the Order historyBash records the command that the user executed in the shell session in the buffer, and when it exits normally, it is recorded in the current user's home directory.
Here's what you'll find useful after reading the third chapter of the Linux command line and Shell script programming encyclopedia.1./ETC/PASSWD file This file contains a list of all system user accounts and basic configuration information for each
This article mainly uses three scripts to implement the LVS configuration. Script 1:lvs.sh is configured on the load Balancer side, and script 2:realserver.sh is configured on the backend real server server. Script 3:check_lvs.sh is a script used to
Shell Script pros and cons analysisThe shell uses external commands and some of the default tools of the bash shell, so it often calls an external library of functions, so the command cycle is less than the traditional programming language.Therefore,
First, Introduction1. Variable type:User-defined variables (local variables)Environment variables: Define each user's operating environment, has learned path,ps1; to be permanent, write to the corresponding locationPre-defined variablesPositional
PackagedTarCpioCompressionZipbz2Example:① Batch compression script: tar-gzip-dir-rm.shImplementation features: Compressed directory under all folders for the same name packaging compressed files (tar.gz), compression after successful deletion;Script
Gitlab backup files are displayed in timestamps, similar to: 1438624820_gitlab_backup.tar to make it easier toread, you want to convert the file name to a date format:2015-08-04_gitlab_ Backup.tarSo I looked for the method of time conversion in the
File Status Test-B FileName: Returns True when filename exists and is a block file (returns 0)-C FileName: Returns True when filename exists and is a character file-D Pathname: Returns True when pathname exists and is a directory-E Pathname: Returns
first, the expression of the blockBecause the shell can not define a two-dimensional array, so can only use one-dimensional array to represent the box, Tetris can be divided into 7 categories, each type of block is composed of four types of small
The Linux shell is much more powerful in programming than Windows batch processing, both in loops and operations. Data types are not comparable. Here's a summary of some of the things that an individual does when it comes to working with arrays.1.
1.shell IntroductionThe shell itself is a program written in C, which is a bridge for users to use Linux. The shell is both a command language and a programming language. As a command language, it interprets and executes user-entered commands
Shell, that is, the hard skin, when the thickness of the shell and its surface rate radius of less than 0.5, known as the "thin shell", the reverse is called "thick shell." Chest armor evolved from shells, shields.In a world of computers that is
Batch deployment of application system shell scripts (Tomcat/jetty) and tomcatjetty on linux servers
Shell script for batch deployment of application systems on linux servers:
1. Replace the server address in the Code (Tomcat or jetty
Frequently used shell commands for updating Mac server services
On the Mac server, you must enable remote logon. Enable: system preference settings-> share check remote LogonCommon Commands include:
Copy (copy the local file to the remote server)
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