Pipe and job control, shell variables, environment variable configuration files

Pipe character | Function: The output of the preceding command is given to the following command job control CTRL Z pauses a task [[email protected] ~]# vim 1.txt [1]+ 已停止 vim 1.txt[[email protected] ~]# vim 2.txt [2]

Shell Script Basics (v)

First, the alarm system main script[[email protected] ~]# cd/usr/local/sbin/# #脚本基本都放在这个文件夹下, convenient management [[email protected] sbin]# mkdir mon## Create a monitoring script home directory [[[email protected] sbin]# CD mon[[email protected]

Shell Learning (iv)

One, character interceptionExprBasic usageExpr substr $var 1 starting position for the length of the Intercept, such as:[Email protected] mnt]# a=centos6.9[Email protected] mnt]#[[email protected] mnt]# expr substr $a 1 6CentosCutBasic usage:Command

24th Lesson Shell's special symbols and Cut_sort_wc_uniq_tee_tr_split commands

First, special symbols' * ' wildcard character, any of any characters'? ' any one character' # ' comment characters' \ ' de-semantic characters' | ' pipingThe prefix of the ' $ ' variable'!$ ' combination, regular inside means end'; ' multiple

Shell Learning variables and quotes

1. The concept of variables: variables are stored in the program of the user's memory space, the variable name is the address of this memory space, the value of the variable is stored in the computer memory. Variable definition: It is simple to

Pipe and job control, shell variables, environment variable profiles

Pipe character and job controlPipe characterThe pipe character means that the output from the previous file is passed to the following command. To display the number of files in the current directory:`Job ControlCtrl Z pauses the current task (can

Shell Script 3

A variable in a shell script means that the command itself can represent a soft connectionShell variablesParentheses can only affect variables in parentheses because the parentheses open the child shellCurly braces affect variables outside the

First knowledge of SHELL commands

1, shell command commonly known as "shell", it provides a user interface with the kernel to interact with, he accepts the user input command and sends it to the kernel to execute 'The shell is actually a command interpreter that interprets the

(a) The first day of the shell

CentOS default shell version: Bashecho $SHELL Opening language ID: #!/bin/bash在执行bash脚本的时候,内核根据#!解释器来确定改用哪个程序解释这个脚本中的内容 Script comments在shell中,#开头的是注释; Execution of Shell scripts方式一:bash script-name或sh script-name (推荐使用)方式二:./script-name

Shell Test condition judgment

Test condition judgment# symbol [] equals test commandTen 5 # Judging the size of echo $? # View the previous sentence The test command returns the status "hello" # To determine if the string length is 0[$ 0"success" | |

Shell Common shortcut keys

I. Historical order   History #查看历史命令  history-c #清空历史命令  history-w #不等退出, write the history command in the cache directly to the history command to save the file ~/.bash_history  vim/etc/profile #默认历史命令保存1000条, can be modified histsize save the

Special usage in bash shell

1 ${bash_source-$0}Represents the full path of the currently executing script.2 cd-p enters with physical path/usr/localhadoop now chains to the/home/houzhizhen/usr/local/Hadoop/hadoop-2.72

The difference between exit0 exit1 in the shell

Exit (0): Run the program normally and exit the program;Exit (1): Abnormal operation results in exiting the program;Exit 0 can tell the user of your program: Your program is finished properly. If exit is not a value of 0, then the user of your

A method of translating shell scripts into binary execution files

Because of the need for plaintext to display passwords in the script, the idea is to encapsulate the already edited shell script into a binary executable file.Using the tool SHCOfficial Download site: http://www.datsi.fi.upm.es/~frosal/Use the

Shell Script Installation Nfs-server

#!/bin/bash: Program:NFS Server installbr/>[email protected]20171129 v1.020171130 v1.1 Modify the following:1. Cancel the grep "style" file &>/dev/null if [$?-ne 0];then Usage, modify to if grep-q "style" file; then method2, all changed to function,

The use of parentheses in the shell Linux shell

Overview of the use of parentheses in the Linux shell 本文主要介绍Linux中括号的用法,主要包含判断文件和变量。**注意事项**:中括号两边必须有空格。The knowledge involved in using brackets &&, | | | 在本文对文件或者变量做判断的时候,可能会多次使用到&&和||这两个符号,所以在我们进入中括号的学习之前首先了解一下这两个符号的作用。 &&:

How shell scripts are executed

method One: Switch toShellthe directory where the script is located (at this time, called the working directory) executesShellScript:Cd/data/shell./hello.shThe./ means to execute hello.sh under the current working directory . If you do not add

Basic concepts of Linux shell programming

Shell programming is actually a program that combines multiple commands, based on bash.Serious attentionThe difference between $hostname and $ (hostname)$hostname is to take the value of the hostname variable$ (hostname) is the execution result of

The second week of Linux learning; shell programming

Pstree-p #显示进程编号 (tree) echo $$ basic structure of #显示当前shell进程编号   scripts: #! Shebang (indicates what shell is used to open a file, typically using bash) configuration_variables #定义变量FUNCTION_DEFINITIONS # define function Main_code #主要执行命令  

The use of if,case,for in shell scripts

DirectoryI. Condition selection: If statementTwo. Conditional judgment: Case statementThree. For loopI. Condition selection: If statement Single Branchif judgment condition; thenBranch code with true conditionFiExample: Judging whether a number

Total Pages: 541 1 .... 404 405 406 407 408 .... 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.