This article, as the last article in the Shell script Base series, does an exercise here. How to use a For loop to execute a command.
1. Use for loop to execute different commands
2.for loop Plus if statement print file
Put the script file
First, Introduction
Regular expressions are commonly used in many of the tools and commands in the shell, and understanding basic regular expressions and extending the meaning and usage of metacharacters in regular expressions is good for skilled
The shell is used to solve the problem of how users communicate with the operating system. In fact, we all have a misunderstanding of the concept of shell, as if the command line shell is called shell. The shell, in fact, is the shell. As
Https://www.cnblogs.com/37yan/p/6962563.htmlCAUTION!!! If should is end with fiCAUTION!!! There should be a space between [and!, also between 1 and]1 ];then#!/bin/bash# Determine if the number of parameters passed in is not an if1 ];then echo
A shell script is a function that uses the Shell's command interpretation to parse a plain-text file and then perform these functions, or it can be said that a shell script is a collection of commands.The shell can be used directly above the
# #思路1Use awk to isolate the IP to 4 segments and then invoke it through a for loop#!/bin/bashSTART_IP="192.168.2.1"j=1for i in `echo $START_IP|awk -F. ‘{print $1,$2,$3,$4}‘`do eval IP$j=$i echo "$IP"$j"" The main difficulty of this idea1.
I suddenly wanted to monitor the network card Traffic in Linux and didn't want to use cacti. I thought it was very troublesome to Configure SNMP. Ready-made tools seem to be useless. Decide to write a script by yourself.
Click (Here) Fold or open
It took me several minutes to think about whether or not I should write this article. At last, my reason for being limited was finally succumbed to the Title I have already written, so I am not afraid of you laughing at me.I did not write this
I/O redirection details and Application Instances
1. Basic concepts (this is the prerequisite for understanding the following knowledge. please be sure to understand it)A, I/O redirection is usually related to fd, and shell FD is usually 10, that is,
Shell scripts are important for Linux system administrators and O & M personnel. I recently read the shell script. In order to systematically learn the shell script, I read the third edition of "laruence's Linux basic learning for Private food,
Shell basics 2: Search Skills, use of find and xargs
Execute shell commands using exec or OK When using find, you only need to write the desired operation in a file, you can use exec to search with find, which
Linux mobile phone DIY. Shell application extension 2. automatically generate a playlist (e680 Series)
Papayas
2007-03-20
I. Origin of the problem
Many people ask what is the best player for e680. I just want to say that it is still a built-in
1. Conditional Variable replacement:BASH Shell can replace the conditions of a variable. It can be replaced only when a condition occurs.Put the condition in.(1) $ {value:-word}If the variable is undefined or the value is null, the return value is
Some questions on SuSE may need another reference: http://blog.chinaunix.net/u2/64804/showart.php? Id = 2026903
Related versions: Red Hat Enterprise Linux
Symptom:
If you set the value in the file/etc/security/limits. conf. However, if you log
1. Here we will summarize how shell reads files.
A), # Use the READ command to read a row of data while read mylinedo echo "line:" $ mylinedone
G ),
The following is what we encountered when learning the company's code. In fact, it cannot be
Shell can represent different hexadecimal data without calling the 3rd-party command. The following methods are summarized here. The default value of a shell script is a 10-digit number, which can represent other numeric values unless the number
Call another script in shell script
Bash shell commands are divided into two types: External commands and Internal commands. External commands are implemented through system calls or independent programs, such as SED and awk. Internal commands are
This article is also the fifth chapter of "Learning the bash Shell" 3rd Edition, Flow Control, 4 of Reading Notes, but we will not limit it to this. Flow control is a very common part of any programming language, including case. Here, we will
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.