01. Mountains-some useless nonsense about the shell

The shell itself is a program written in C, which is a bridge for users to use Unix/linux, and most of their work is done through the shell. the shell is both a command language and a programming language. as a command language, it interprets and

BASH SHELL not a valid identifier

Resolve Bash Shell pin this newspaper error ': not a valid identifierWhen you edit the script in the shell, the runtime appears "': not a valid identifier", or it will appear (: Command not found, many inexplicable symbols) is likely you to edit

Shell Echo Color Example

#!/bin/bash# Test color for scriptred_color= ' \e[1;31m 'green_color= ' \e[1;32m 'yellor_color= ' \e[1;33m 'blue_color= ' \e[1;34m 'pink= ' \e[1;35m 'res= ' \e[0m 'if [$#-eq 2] Thenecho "Usage: ' basename $ ' content {Red|blue|yellow|pink|res|green}"

The eval command in the shell

In Shell learning, we encounter these two symbols: anti-quote (') and $ (), what are the differences between them?We all know that in bash, anti-quotes and $ () are used for command substitution, and command substitution is used to reorganize the

Use of shell scripts---cut intercept data

Usage of the Linux Cut commandFont: [Increase decrease] Type: Reprint time: 2013-10-03 I want to commentCut is a selection command that analyzes a piece of data and takes out what we want. In general, the selection of information is usually for

Used in shell programming to determine parameters within an if statement

Http://blog.chinaunix.net/uid/21411227/cid-63616-list-1.html1. Determine the file type –b Returns True when file exists and is block  -C Returns True when file exists and is a character  -D returns True when pathname exists and is a directory  -E

View shell script rollup for IP traffic

The first part,1. View TCP connection StatusNetstat-nat |awk'{print $6}'|sort|uniq-c|sort-Rnnetstat-N | Awk'/^tcp/{++s[$NF]}; END {for (a in S) print A, S[a]}'netstat-N | Awk'/^tcp/{++state[$NF]}; END {for (key in) print key, "\ T",

Shell Process Control of Linux shell learning

In the Linux shell programming, the process control structure and the statement, also is the shell script the emphasis, does not understand the friend, follows the script small compilation together to study.Linux control flow structure learning.One,

Shell-awk Advanced Applications

AwkI. Introduction of AWKscripting languageVariable..... Process Control array functions        use awk for Data statistics        1 Number of users in the statistical system, number of built-in users          2 statistics Site Server traffic for

Shell Scripting Learning Notes (advanced usage of SED----mode space and hold space)

Some time ago in the study shell script, the last mention of the SED mode space and maintain the concept of space, but has not studied well, these two days studied, so it sent, not very comprehensive, just for your reference.Keep the space sed under

Get cacti rrd file daily peak shell

The code is as follows:Url= "/VAR/WWW/HTML/RRA/150/9517.RRD/VAR/WWW/HTML/RRA/256/11345.RRD/VAR/WWW/HTML/RRA/150/9518.RRD" fff= ' echo   $url  | awk  ' {print nf} ' for ((i=1;i> /tmp/test${x}done                            ff= '

Shell Echo Color Example

#!/bin/bash# Test color for scriptRed_color= ' \e[1;31m 'Green_color= ' \e[1;32m 'Yellor_color= ' \e[1;33m 'Blue_color= ' \e[1;34m 'pink= ' \e[1;35m 'res= ' \e[0m 'If [$#-eq 2]Thenecho "Usage: ' basename $ ' content

Various strange symbols in the Linux shell

There was a time when the shell was not written, and today I occasionally see a shell file content. There are some special usage, only feel the impression but can not say the specific function, and then checked. By the way record down, prepare for

Shell Custom Variables

Print variables[Email protected] shell]# echo $PATH/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/binCustom variables[[email protected] shell]# a=1 custom variable [[email protected] shell]# echo $a print variable 1Write a script

The difference between single quotes, double quotes, and no quotation marks in a Linux shell

Single quotes:What you see is what you get: The contents of the single quotation mark are output as-is, or what you see in single quotes is what you output.Double quotes:Output the contents of the double quotation marks: If there are commands,

One of the Linux Shell Scripting Learning and combat

1. Create 10 files in the/test directory using a For loop such as: Test-1,test-2,... test-10mkdirsh.sh#!/bin/bashFor i in ' seq 10 'Do[!-d/test] && mkdir-p/testtouch/test/test-$iDonechmod +x mkdirsh.sh2, in the/test directory to quickly create 10

Linux Shell Text Processing tool Highlights

This article describes the most common tools for using the shell to process text under Linux:Find, grep, Xargs, Sort, uniq, tr, cut, paste, WC, sed, awk;The examples and parameters provided are the most commonly used and most practical.I use the

Linux Shell Programming Grooming

Often read some of the books about Linux still feel unable to fully grasp this knowledge can not be fully mastered as long as you can achieve proficiency in the use of after all, do research and development is able to quickly make products to sell

The echo printf command for Shell programming

Both Echo and printf in the shell can be used as output, and printf is an enhanced version of EchoShow escape charactersecho \ "Abcdef\" ">>> "ABCdef"Show variablesAge=23echo "My Age is $age">>>my name is 23In the process of use, in order to avoid

36th Spark TaskScheduler Spark Shell Case Run log detailed, TaskScheduler and Schedulerbackend, FIFO and fair, Task runtime local algorithm details

This lesson content:1.      Two dispatching modes of taskschedulerbackend and Schedulerbackend2.     fifo and fair 3.     task allocation of data local resources I. Scheduler run process (Spark-shell angle) 1. Start spark-shell When we spark-shell

Total Pages: 541 1 .... 150 151 152 153 154 .... 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.