Shell Learning Locate and find commands

There are several commands on the Linux system for file search, such as: Locate,wheris and find are more commonly used in work.1.locate command: Locate the lookup file is based on the/var/lib/mlocate database, which contains all the local file

Shell introduction, History, aliases, wildcards and redirects

Shell Introduction The shell is a command interpreter that provides interaction between the user and the machine Support for specific grammars, such as logical judgments, loops Each user can have their own specific shell CentOS7

Bash Shell summarizes "four" regular expressions

Regular expressionsSingle character notationThe character itself . \d \d \w \w \ t \ r \ \s \s [ABC] [A-c] [0-2] [1-3a-cx-z] [^ABC] [: Upper:] [: Lower:] [: Alpha:] [: Alnum:] [:d igit:] [: xdigit:] [:p UNCT:] [email protected]\^_ ' {|} ~-][: Blank:]

Shell Script Programming Learning notes-while loops

1. When type cycle and until type cycleWhile using a few, the general daemon program or always loop execution will be used, the other loop operations are used for instead.1.1 Type and until type loop syntax(1) While conditional

Daily shell scripting Exercises (02)

1. TopicsThere are log 1.log, part of the following:112.111.12.248 - [25/Sep/2013:16:08:31 +0800]formula-x.haotui.com "/seccode.php?update=0.5593110133088248" 200"http://formula-x.haotui.com/registerbbs.php" "Mozilla/4.0 (compatible; MSIE 6.0;

Shell Combat: Script Automation to build an IPSec test environment

1.shell script gets the native IP address:localhostip= ' lc_all=c ifconfig 'inet addr:'127.0.0.1' | '{print $}'"$localhostIP"2. Automate the setup of an IPSec test environment:#!/bin/Bash#sudo Suecho"Get root! "apt-get Install Strongswan-

About the shell script read the parameter issue

There are two ways to send a shell script:Way 1:sh file.sh arg1 Arg 2 ....Mode 2:read-p "hint" Arg 1 arg2The default parameters are directly separated by a space, following a few examples to explain the problems encountered in the communication and

Shell Learning Notes (3)

If one, if base 1, single branch 1.1 syntaxif语句语法 单分支结构语法: if [条件]; then 指令 fi 或 if [条件] then 指令 fi1.2 Examples[[email protected] day4]# cat if-single1.sh #!/bin/sh#功能:单分支if结构整数比较,用-lt格式例子#created by

Shell Scripting Learning notes-integer Two-dimensional comparison operator

1.1 The following table is a common two-dimensional comparison operatorWe can also see through the man testTips(1) The ".(2) the ">" symbol is greater than the meaning, if[["$a" > "$b"]], if[["$a" \> "$b"]. You need to escape in parentheses because

Shell-jump out of the loop break and continue

Break:Berak statements are usually used in loop statements and switch statements, and when the break statement is used in a do-while, for, and while Loop statement, the program terminates the statement following the loop. Usually the break

Shell programming Exercises-Bulk Create delete users and groups

1. Requirements Reed is a system administrator who needs to add a teacher and several student users to a server in a classroom, manually adding too much trouble, and ask you to write a bash script for him userctr.sh implement bulk add and

Linux Shell Basics

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

Shell Exercises (v)

Exercise 1:Delete the letters in the textRequirements: Delete the line containing the letters in the first 5 lines of a text document and delete all the letters from 6 to 10 lines (file 1.txt, lines greater than 10 lines)Reference Answer:#!/bin/bash#

Shell scripts, if judgments, case judgments

ffi

20.5 logical judgments in shell scripts If judgment #if If the 1:if condition of the Chinese language; fi[[email protected] ~]# a=5;if [$a-gt 3];then echo OK; fiok; The reference text format is as follows: # !/bin/basha=5if [$a-gt 3]

Shell Script--permission assignment

Because shell scripts are a collection of many commands, these commands may involve manipulating a file, and the execution of the shell script requires the current user to have permission to run the script, otherwise it will fail because of

Shell Programming-control structure

1.shell condition judgmentCommand: Test or [Use "[" to End With "]" and a space between judgment statementssuch as: Determine if the demo.c file existsIf [-F DEMO.C]Then...FiOrIf Test–f demo.cThen...Fi1.1 String Comparisonsstring1 = string2 Same as

Basic knowledge of shell scripts

1.shell command interpreter or shell auto-ops language2. How to execute a shell script(1) Execute permission must be given./first.sh(2) SH first.sh(3) Source first3. More complete Script compositionScript DeclarationComment InformationExecutable

Shell Script notes (i) Concepts and variables

Concepts and Variables I. Understanding shell scriptsThe shell is a command interpreter that executes the commands and programs that the user enters in order (the command that encounters the sub-script, which executes the sub-script first) .The

20.16/20.17 function in Shell 20.18 array 20.19 alarm system requirement analysis in shell

20.16/20.17 functions in the shellImplicit functions for displaying variablesResults of executionparameter is only one 1, the result of the first is 1, the second is empty, the third is empty, the name of the limb is fun1.sh, a total of 1

Shell script login template description, shell script Template

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

Total Pages: 541 1 .... 238 239 240 241 242 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.