Use of shortcut keys
(1) Search operation shortcut key for Search history command: Ctrl+r. Of course, not the command you want, you can continue Ctrl + R to search for related commands, press ENTER.If you want to increase the number of command
1.1. After opening the terminal, a prompt will appear, usually in the following form:
[email protected]$
Or is:
[email protected] #
It is either simply expressed in $ or #.
($ represents a normal user, #表示超级用户 (root
A ShiftParameter shift LeftUntil [$#-eq 0]Doecho "The first parameter is: The number of arguments is: $#"ShiftDoneTwo WcThis command is used to count the number of bytes, words, and lines in the specified file. The command options have the following
in recent times, when dealing with shell scripts, you have encountered time processing problems. The addition and subtraction of time, as well as the calculation of the difference. Gets the current time stampDate+%s1. The time-plus-minus approach
The part of judgment and inspection can be set or not executed checknginxroot to avoid being subject to permission problems#!/bin/bash#by LCip= ' Ifconfig eth0|awk-f ' [:]+ ' Nr==2{print $4} 'Curl= ' curl-i $IP |egrep "403|200|404" |head-1|wc-l
Special Symbols: *Description: Wildcard character, multiple characters. All files with the suffix ". txt" are listed to[[email protected] 111]# ls *.txt11.txt 1.txt 22.txt 2.txt 33.txt 3.txtSpecial symbols:?Description: Wildcard characters, one
Shell commands are usually divided into two categories:Built-in commands (man Builtins)External commandThe difference between the two is analyzed below.Built-in commands:Internal commands are built into the shell. The internal command executes very
Based on some articles on the reference Web, a system-initialized shell script is summarized.#!/bin/bashcat /dev/nullyum-y install ntpdate &>/dev/ Nullntpdate 0.centos.pool.ntp.org &>/dev/nullhwclock-wformat###########################################
ls: View file name and directory, usage: $ ls [option]1. $ lsEnter the LS command directly, listing all files and directories in the current directory, without displaying details such as type, size, date permissions, and so on.2. $ ls-lThe-l option
1) How do I pass parameters to a script?./script argumentExample : Show file name script./show.sh File1.txtcat Show.sh#!/bin/bashcat $2) How do I use parameters in a script?First parameter: $ $, second argument: $ AExample: The script will copy the
Knowledge Point Grooming: Click the link to enter1. Shell Introduction and variables, scripting related concepts2. Bash Programming: Condition testing3. Bash Programming: arithmetic operations4. Bash Programming: If statements5. Bash Programming:
I. Case ORDERCase variable invalue1)Command (s);;value2)Command (s);;*)Command (s);;EsacIf the case variable is not matched, the program executes *) after the statement.Shell wildcard and vertical bar (|) are allowed as the OR operator in case
Shell Learning Notes# #变量# #普通变量:EG1:Name=axeEcho $nameps. equals two times cannot have a space, otherwise it will be an error.EG2:Name= "Axe Prpr"Echo $nameOrName= ' Axe PRPR 'Echo $namePS. Double quotes can refer to other variables, single
Bash Variable type:Environment variablesLocal variables (local variables)Positional variablesSpecial variablesLocal variable: Valid only in the current process (shell).BASH: Direct use, no need to declare: Name = Jerry;Variable substitution: How to
-------------------------------------------------------------------------------------------------The types of variables in the shell are all strings by default, so:#!/bin/Bashaa=1bb=2cc= $aa +$bbEcho $cc 1+2Number of ways to calculate:Declare
Note: Gitlab is a git service program that has a Web graphical interface and a range of management tools, specifically detailed to Google it.This can be said to be the last "Linux shell script Atlassian Confluence Remote backup method" of the sister
1) Start specifying the script interpreter#!/bin/sh; #!/bin/bash2) opening plus version and copyright information3) No Chinese comments in script4) file saved with. sh extension5) Full-time write-in of paired content to prevent leakage6) [] have
1. HBase provides a shell terminal to interact with the user2. The DDL operation of the HBase shell(1) Enter HBase shell command line first, that is hbase_home/bin/hbase shell ... >quitTo Create a table:>create'Users','user_id','Address','Info' //
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