The function return value in Shell exceeds the limit.
This article mainly introduces the function return value in Shell that exceeds the limit. In shell, return is restricted. If the return value exceeds 255, the return value starts from 0, for
68. Logical judgment in shell script, file directory attribute judgment, if special usage, case judgmentI. Logical judgments in shell scriptsFormat 1:if condition; Then statement; FiFormat 2:if condition; Then statement; else statement; FiFormat
Case Statement in shell: it can match the variable content with multiple templates, and then decide which part of the code should be executed based on the template that matches successfully. Format of use for www.2cto.com: case matching mother board
Shell script variables are processed as strings rather than numbers by default, which makes it complicated to perform mathematical operations in shell scripts. Perl and python will be a better choice to maintain Script Programming specifications and
Expr command========
At first, the Bourne shell provided a special command to process mathematical expressions. The expr command allows you to process mathematical expressions on the command line, but is particularly clumsy: $ expr 1 + 5 6 The
Two Methods for referencing and calling another script file in Shell scripts
This article mainly introduces two methods to reference and call another script file in Shell scripts. This article introduces the syntax of the two methods, and then
Array in shellArray in shell
As a language, shell must not lack an array. The following describes the array content in shell.
Bash provides one-dimensional array variables. Any variable can be used as an array; the built-in command declare can
Use echo in shell to print the color font and background
It's fun to print the terminal in shell!
First, we know that echo printf is usually used in shell terminal printing;
Note: font color reset = 0, black = 30, Red = 31, Green = 32, *** = 33,
I. Functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call the name of the small unit directly.Format:function f_name() { command}Note: The
There are a lot of for loop usage in shell. I always want to summarize it. Today I saw a summary of for loop usage on the Internet, which is very comprehensive. So I will turn to research and study...1. for (I = 1; I 2. Commonly Used in shell is for
Shell and export commandsAfter a user logs on to Linux, the system starts a User Shell. In this shell, you can use the shell command
Or declare variables, you can also create and runShell script program. When you run the shell script program, the
Tag: Shell
Before talking about [email protected] and $ *, you need to start with the positional parameter of shell script...We all know how variables are defined and replaced.However, we also need to know that some variables are set in shell, and
I. wildcard characters
* Represents any character ranging from 0 to infinite.
Example: Find the file name starting with cron under/etc/
[Root @ instructor Desktop] # ls/etc/cron *
/Etc/cron. deny/etc/crontab
/Etc/cron. d:
0 hourly raid-check
The braces and parentheses in shell I want to talk about here are several types of shell parentheses, the structure of braces and the variables in parentheses. The Command usage is as follows: www.2cto. com1. $ {var} 2. $ (cmd) 3. () and {} 4. $
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.