Shell input and output

By using the Read command, you can output or perform operations after entering content from the terminal1 #!/bin/bash2#Author: Blacksonny3#Copyright (c)4 #Script follows here: 5 6 Echo " How is old is you ? " 7 Read Age 8 Echo " " $ageThe above

Shell learns 37 days----references

ReferenceCase , If I want to output an asterisk (*), How do i use echo ?echo *This is certainly not possible , need to transfer the * , that is : Echo \*This leads to the concept of references . referenced by , is used to prevent Shell to interpret

Linux Shell Program Debugging

Method One: Add debugging options when you run the script:"Usage" bash– option./shellscript.sh-e: If a command returns a non-0 exit status value (failed), exit.-N: You do not need to execute the script just to check the syntax structure and return

Shell Script notes (the original is constantly recorded)

Start your own shell script practice today, just as the company has too servers, to time the data of the CP is monthly:Consider: First look for the law, found all placed in the/opt/www/aaa/there are a lot of 2 level and 3 levels of directories and

Shell Learning Path: Process Control (while)

While Loop :Description: The while loop is an indeterminate loop, also known as a conditional loop. As long as the condition is judged, the loop will continue to execute until the condition is judged, and the loop will stop, which is not the same as

Shell Learning Path: Process Control (for)

Syntax for the FOR loop:1. For variable in value 1 value 2 value 3 ....DoProgramDoneFor example: The following script will print 4 times respectively the value of morning noon afternoon evening1 #!/bin/bash2#打印时间 3#Author mrfeng45 for-time in

Logon shell and non-logon shell read file procedure

Logon shell and non-logon shell read file procedureLogin:/etc/profile→/etc/profile.d/*.sh ~/.bash_profileNon-login: ~/.BASH_PROFILE→~/.BASFRC→/ETC/BASHRC#soure. Bash_profile Manual Update/etc/profile valid environment variables for general

Linux Shell Test keyword

1) Judgment expressionIfTest (expression is true)IfTest! expression is FalseTest expression 1–a expression 22 expressions are trueTest expression 1–o Expression 22 expressions have a true2) Judging the stringTest–n string string is not zero in

Shell creation functions and reference functions

Typically, when you write a shell script, you'll find that the same piece of code is used in multiple places. It doesn't matter if it's just a small piece of code. But it's hard to rewrite chunks of code multiple times in a shell script. The bash

Shell Review---File decompression command

Need to deploy the server itself, so after the application of space, you need to install Linux itself, install Apache, etc., so download the compressed file needs to run. On the internet to find some decompression command wrong, especially try the

WDCP Environment Build shell script analysis--install.sh

#!/bin/bash### #定义screen的名字, the following installation will use screen this command screen_name= "LANMP" #根据 $UID to determine whether the user is root, must root to perform if [  $UID  != 0 ]; then    echo  "You must be root to

A summary of---variables, comparisons, and tests used in shell programming

One, variableEnvironment variables, positional variables, pre-defined variables1. Environment VariablesEnv #查看环境变量2. Position variableVI location.sh#!/bin/bashsum= ' expr + $ 'echo "$ + $ = $SUM"./location #则12为第一个位置变了 $1,32 changed the second

Shell creates hive table partition periodically

First look at the help command for hive:[[email protected] hive]$ hive-hmissing argument for option:husage:hive-d,--define Va Riable subsitution to the Apply to hive commands. e.g.-D a=b or--define a=b--database Specify the database to Use-e SQL

Shell script obtains native IP address

Tag: IP address #!/bin/bash#author: #date: 2015-6-13#filename:ip.sh############################ #ifconfig_cmd = ' which  Ifconfig ' $ifconfig _cmd > ifconfig.me################################## #function  obtain_ip_ Information () { if grep -q  '

Special usage of $0,$?,$! in shell

$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the Case of "" ", in the

Three vernacular classic Algorithm series Shell sort implementation

The mountain is the essence of the package insert sort sort. This method is also known as a narrow incremental sort because of DL. Shell to 1959 named.The basic idea of this method is to first cut the whole sequence of elements into several

Shell script [Operational expressions, conditional control statements], shell expressions

Shell script [Operational expressions, conditional control statements], shell expressions #! /Bin/bash # The four expressions you deserve to add to your favorites. Val1 = 1val2 = 1val3 = 1val4 = 1val5 = 1val6 = 1val7 = 1let val1 ++ (val2 ++) val3 =

Linux Shell expressions and linuxshell expressions

Linux Shell expressions and linuxshell expressions Strictly speaking, shell does not have the expression concept. Shell itself is actually a collection of a bunch of commands. Of course it is not just a collection of random together, but a certain

Solution for shell not displaying the user name path in CentOS

Solution for shell not displaying the user name path in CentOS In CentOS, shell-bash-4.1 $ solution to not display the user name path Problem description: Add a new user under CentOS. After logging in, the shell script information is as follows:

SHELL script-1, shell-1

SHELL script-1, shell-1 .: Represents any character *: Matches the preceding character. a * Indicates zero or multiple. +: Match with the previous character to indicate one or more previous characters. ? : Matches with the previous character to

Total Pages: 541 1 .... 438 439 440 441 442 .... 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.