23. Shell Introduction, Command history, command completion and aliases, wildcard characters, input and output redirectionFirst, Shell introductionThe shell is the intermediate medium that the system interacts with the computer hardware, it is just
View the default shell types supported in Linux:/etc/shellsEcho Output command-e support for character conversions with backslash controlControl character (requires quotation marks)
\\
Output \ Itself
\a
This is the case with the switch as an example of the script written, other manufacturers of equipment according to the device command to modify the script.DemandBulk Backup network device profile to FTP server, and automatically compress the
#/bin/bash# definition of Nginx Source package version, the script will check whether the file is in the current directory according to the version name and suffix if you need to install different versions of Nginx can modify these two variables
The code is as follows:Download: Https://gitee.com/LoongWang/shellrecycling.git1#/usr/bin/EnvBash2 3 4 #定义5 #定义回收站目录6Recyclingdir='/usr/local/recycling/'7 #定义回收站log文件8recyclinglog='/var/log/recyclinglog'9
about the futureAnd is she really human?She ' s just so something newA Waking Lithium flower --"Lithium Flower" in The depicted by Ghost in the Shell, mankind and machinery is combined. Cyborg, refers to the human organ that
With the more and more application of Linux system in enterprise, the automatic management of server becomes more and more important, in some complex Linux maintenance work, a lot of repetitive output and interactive operation are not only time
In order to make the shell script have a certain "judgment" ability, according to different conditions to accomplish different management tasks. Make the script a certain "smart".First, condition test operationFile Test Common operations:-D:: Test
Configuration knowledge such as Vim path is shown in table:
Related configuration Files
Function description
. viminfo
User's operation history using Vim
. VIMRC
Configuration file for
***大家好,我是霸王卸甲,又到了今天更新文章的时间了,今天给大家带来的是第一章中的第二小节 shell语言!!***
GNU Bash Introduction: The shell is the user interface of the system and provides an interface for users to interoperate with the kernel.It receives the command entered by the user
First Category: Digital cycle-----------------------------for1-1.sh#!/bin/bash for ((i=1; i; i++)); do Echo $ (expr31); Done -----------------------------for1-2.sh#!/bin/bash for with $ (seq1) do Echo $ (expr31); Done --------
Get seven Method 1 of string length. \${#str}Length of 2.awkNote:1) It is best to use {} to place the variable2) You can also use length ($) to count the lengths of each line in the file3.awk NFNote:-F is a delimiter, NF is the number of fields,
Shell IntroductionThe shell is the user interface of the system and provides an interface for users to interoperate with the kernel. It receives the command entered by the user and feeds it into the kernel to execute.There is a layer of things
Shell Scriptdking~ sharing1.1 Scripting ConceptsPut multiple commands into a single file to facilitate one-time execution of a program fileUnified Script Storage Directory:/server/scriptsUsing Vim to edit scripts is recommendedTo view the script
Shell script is similar to batch processing under Windows/dos, that is, the use of various commands pre-placed into a file, convenient one-time execution of a program file, mainly for the convenience of administrator settings or management. However,
This article describes the underlying file operations: Create, move, edit, delete files and foldersCommand and Case:mkdir Creating a Directory--Create two directories[Email protected]:~$ mkdir test2 test3--Create a new directory under Test1
Shell Preparation1. Identify the shell typeEchoEcho $BASHEcho $SHELLThe top three command results are:/bin/bash2, Terminal common operationA, delete a single character c+h or BACKSPACE keyB. Delete single word c+wC, delete a single row c+ud, repeat
Shell script login template description, shell script Template
Write notepad and change the file suffix to sh
#! /Usr/bin/CT
# Log on to ssh
# Use the ssh server spawn in combination with Alibaba CT and send
Spawn ssh root @ ip
# Expectation
Reset
Use of the special variable IFS in shell, and the difference between the value of $ '\ n' and' \ n', shellifs
When a for loop is used in shell, the IFS is also used to define the separator. To specify multiple IFS characters, you only need to
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.