Shell IFS readline.sh

Processline () {line= "[email protected]" echo $line} file= "" if ["] = = =" "]; Then file= "/dev/stdin" Else file= "$" if [!-f $FILE]; then echo "$FILE: does not exists" exit 1 elif [!-R $FILE]; Then Echo '

Some shell commands that you learn and save yourself

Absrtact: In the process of learning, inevitably encounter some commands, the kind of need, but you do not have command. In order to save time, worry about forgetting these, special Open this essay, at any time to record some of the commands used.

Shell Script Note 1

Finding mathematical expressionsVALUE=$[6/3]value=$ ((6/3))Let "value + = 1"Defining local VariablesLocal valuedefining integersDeclare-i valueCommand substitutionValue= ' Command 'value=$ (command)System variables$n, nth parameter$#, number of

Shell redirection 1> 2> &>

0 indicates standard input1 indicates standard output2 indicates standard error output> default to standard output redirect, same as 1>2>&1 means redirecting the standard error output to the standard output.&>file means to redirect both the standard

Linux Jobs (iii)-shell statistics The most frequently occurring n words in an article and sorts the number of output occurrences

Linux class Assignment Wednesday, if there is a poor consideration to the place, also please advise.Shell Processing Text See this blog for common commands related to##如果输入两个参数 is the first to count the number of words, the second is the article to

Shell programming (13) --- WHILE LOOP

The while loop is applicable to scenarios where the number of loops is unknown.Syntax format: While conditiondo statement ...... Done Note: While is used to execute a loop when the condition is set up. When the condition is invalid, the loop is

Customized shell in Ubuntu

The custom shell in Ubuntu generally includes the Host Name and file directory. when too many files are opened, the whole shell will become very long, thus affecting the vision. Enter $ echo $ SP1 in the terminal to know the default shell style, for

Shell to view the basic information script of the system

#! /Bin/bashecho "IP:" ifconfig | grep "Inet ADDR" | grep-V 127.0.0.1 | awk '{print $2}' | awk-F ': ''{print $2} 'echo" Product Name: "dmidecode | grep nameecho" CPU info: "dmidecode | grep-I cpu | grep-I version | awk-F ': ''{print $2} 'echo" disk

Shell condition judgment

Traditional if statements -- use conditional expressions as if conditionsIf [conditional expression]ThenCommandCommandCommandElseCommandCommandFiConditional expressionsFile expressionIf [-F file] If the file existsIf [-d...] If the directory

Simple string operations in Shell

In shell programming, some string variables are often processed. For example, commands such as awk, expr, sed, and TR are often used to calculate length, intercept substring, and replace character. Next we will introduce a simple string processing

O & M series: 08, spark Shell

./Bin/spark-shell -- master spark: // master: Port StartCluster mode: Master = spark: // 'hostname': 7077 bin/spark-shellbin/spark-shell -- master spark: // es122: 7077 standalone mode: bin/spark-shell local [4] loads a text file spark context

An example of a netizen shell 20140702

After a netizen watched the old boy's shell video today, he asked the following question: 650) This. width = 650; "Title =" snap17.jpg "alt =" wkiol1oz8i_gwllfaaetvavr46c745.jpg "src ="

Get the shell script code for two date intervals

Copy codeThe Code is as follows :#! /Bin/sh # Obtain the date interval from the first day of the quarter to yesterday # Link: www.jb51.net # Date: 2013/2/28 Day = 'date-d "1 days ago" "+ % Y % m % d "';Year = 'expr substr $ {day} 1 4 ';Month =

Introduction to linux shell udfs (definitions, return values, and variable scopes)

1. define the shell function (define function) Syntax:[Function] funname [()]{Action;[Return int;]}Note:1. It can be defined with function fun () or fun () without any parameters.2. If the parameter is returned, the value "+: return" is displayed.

Vulnerability description of shell. application Object

Environment: 2 kserver + iis5 succeeded. The default permission is iusr. Iis permission: script executable Description: by default, the server. createobject method can be used to use installed components on 2 k servers. For example, we all know

Summary of shell mathematical computation

1. Example of an error method A) Var = 1 + 1 Echo $ var The output result is 1 + 1. Tragedy. B)Var = 1Var = $ var + 1Echo $ varThe output result is 1 + 1, which is still tragic. 2. Correct Method1) Use letVar = 1Let "var + = 1"Echo $ varThe output

Using screen to implement near-concurrent shell Remote Call and partial implementation

Assume that the same Command needs to be executed on multiple nodes (considering the uncertainty of the command). Generally, the for loop is used and the command can be directly called through ssh. For example, you need to view the root directory

Very powerful shell to write Russian square, shell Russian square

Very powerful shell to write Russian square, shell Russian square On the Internet, you can see a Russian box written using linux shell scripts. It is the most awesome shell I have ever written. Share. The original author information is included in

Text and log filtering in shell programming

1: grep command: Grep-v "char" file_name match text that does not contain "char" Grep-n-w "char" file_name completely matches a character Grep ^ s $ s is the text that matches the first or last row of s. 2: tr command Tr set1 set2 replace set

Use shell to count IP addresses and MAC addresses in the LAN, as well as unused IP addresses.

Sometimes you need to configure a static IP address for the server or something and you do not know that the IP address is not occupied. In this case, it is very convenient to use this script.# Cat arping#! /Bin/bashIPaddr = 192.168.0.IPFILE

Total Pages: 541 1 .... 537 538 539 540 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.