The role of various parentheses in the shell (), (()), [], [[]], {}

One, parenthesis, round brackets () 1, single parenthesis () The command group . The commands in parentheses will be executed in a new sub-shell sequence, so the variables in parentheses cannot be used by the rest of the script. Multiple

Shell Programming Awk Basics Introduction

awk IntroductionReport Generator, formatted text outputThe processing mechanism is similar to the SED command, which comes with loop processing, reads a line and then automatically reads the next line to processThe identity of the SED command

Shell special symbol cut,sort_wc_uniq,tee_tr_split, Shell special symbol

Special symbols * Any character ? Any one character Comment characters Indicates that the order does not take effect, and explains \ de-Semantic characters | Pipe breaks, several commands related

Differences and connections between the terminal (terminal), Shell, TTY, console, bash

1, terminal (termimal) = TTY (teletypewriter, fax printer), the role is to provide a command of the input and output environment, under Linux using a combination of keys ctrl+alt+t Open is the terminal, you can think terminal and TTY is synonymous;2,

Hive Learning Pathway (18) shell operations for Hive

One, hive command line 1, hive support some of the commands Command Description quit Use quit or exit to leave the interactive shell. Set Key=value Use the To set value of particular configuration variable. One thing to note here's if you

The while loop of the shell script

Directory:I. While loop and until loopTwo. Loop control statement continue break shiftThree. Special usageI. While loop and until loop 1.while CycleWhile CONDITION; DoLoop bodyDoneCONDITION: cyclic control condition; Before entering the loop,

Linux Learning Summary (17)-shell Basics

The content of this article is very miscellaneous, but it is not difficult to understand, do not map by example.First introduce several characters commonly used characters:1 * matches any of any characters2? Match an arbitrary character3 # comment

Shell monitors whether automatic backups are successful (determine if files exist)

Once the backup SQL file is generated in auto-package, monitor the operation!#Crontab Time # variablesfile_dir=/data/mysql_bak/ #备份存放路径DATE = ' Date +%y_%m_%d ' #获取当前系统时间FILE_NAME = " Mysqldata_bak_$date.tar.gz "#最终保存的数据库备份文件名FILE =${file_dir}

Linux Learning Chat (i)--shell basic operations and commands

Linux Learning Chat (i)--Shell Basic operations and commands(Reproduced please attach this article link--linhxx)1, #!/bin/shPlaced at the beginning of the program, expressed in/bin/sh way to parse.2. Variables1) variable assignment varname= ' xxx ',

The arrangement of several random numbers of shell scripts (arithmetic basis)

Blog content is about the shell script number of the arrangement, more basic, mainly sharing logic, there are better ideas to share in the review of common progress.The script implementation prompts the user to enter 3 integers sequentially, and the

Shell Special Symbol/cut,sort,wc,uniq,tee,tr,split command

Shell Special Symbol Cut commandShell Special Symbols* *任意个任意字符* ?任意一个字符* #注释字符* \脱义字符* |管道符Command cutcut is used to intercept a field in the form of: #cut –d ' separator character ' [-cf]n,n is a number.Options:- D is followed by a delimiter, and

Shell Exercise: Write a script to do the following: Enter a number, and then run the corresponding command. The display command is as follows: *cmd

Tag: Date command displays case false cmd put who bar inputShell Exercise: Write a script to do the following: Enter a number, and then run the corresponding command. The command is displayed as follows: *cmd meau** 1--date 2--ls 3--who 4--pwd When

Shell printf Command

In the previous section we learned about the Shell's echo command, which we'll learn from the Shell's other output command printf.The printf command mimics the printf () program in the C library.printf is defined more by the POSIX standard, so a

Shell Script SMS Monitoring script (disk, CPU, etc.)

Under BinVim sms_monitor.sh#!/bin/bashCD ' DirName $ 'timestamp= ' date + '%F%h:%m:%s 'Disk_flag=falseInode_flag=falsePing_flag=falseCpu_flag=falseIowait_flag=falseSms_flag=falseDisk_over= ""Inode_over= ""Ping_over= ""Cpu_load_average_over= ""Iowait_

3 ways the shell reads files by line

the shell reads files by line There are many ways to do this, and here are three ways to write:Writing one:#!/bin/bash# Description: # while loop read Line operation # Author: Lone Boat Dot # version:1.0#创建时间: -one- Geneva:

Shell Script debugging

1. Use the Dos2unix command to process scripts developed under WindowsThe following scenarios for placing scripts under Windows for editing under Linux are as follows:[[email protected] ~]# cat-v nginx.sh #!/bin/bash^Ma=1 n^Msum=0 ^ M while ((a 0

Linux-shell series 7-ssh key generation distribution

Sshpass This software is for SSH to provide a password to useYum Install sshpass- yBulk distribution of script content#!/bin/bash. /etc/rc.d/init.d/functions# Create key\rm ~/.ssh/id_rsa*-FSsh-keygen-t rsa-f ~/.ssh/id_rsa-n ""-Q# Distributing

Linux shell numeric comparisons and string comparisons and correlation

The string is compared to the integer type, because the ABCD and other characters are not 0123 when the program tries to turn to binary, the conversion cannot be completed, so the operation used for the numeric comparison cannot be used for the

Functions and arrays in the shell

Functions in the shell1. First case:[[email protected] shell]# sh fun1.sh the first par is bthe second par is athe third par is 2the script name is fun1.shthe number of par is 5[[email protected] shell]# cat fun1.sh #!/bin/bashfunction inp(){

Shell script ping test (Code instance), shellping

Shell script ping test (Code instance), shellpingShell script ping Test Principle: use shell scripts to execute a ping command. 1) The destination_ip variable is the IP address of the target host. 2) The-c1 parameter after ping indicates the

Total Pages: 541 1 .... 114 115 116 117 118 .... 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.