[The source command in the]shell is followed by a dot space and a description of the executable file

It's recorded in a shell script.. ./file.sh and/file.sh the difference, this article refers to the http://www.lslnet.com/linux/dosc1/39/linux-283534.htm (this blue forest thing should be derived from Chinaunix)A little experiment.Scenario One:VI

Write a shell script to count the local traffic during a certain time period

Below is the output information of my wlan0 NIC, you can use Ifconfig or Ifconfig | Sed-n '/wlan0/,10p ' gets the format of the displayed informationwlan0     Link encap:ethernet  hwaddr xx:xx:xx:xx:xx:xx             inet addr:172.29.164.251  bcast:

The maximum number of arguments the shell supports

This article turns from: http://www.jb51.net/article/56548.htm This article mainly describes how many parameters the shell supports? This article is a test article on how many parameters a shell can enter, and the friend you need can refer to the

What is a shell?

After the user logs on to Linux, a system prompt symbol appears, which allows you to enter a lot of commands after the symbol and get the desired effect, who is behind the scenes who is helping us with this whole pile of things? is the shell, and

Some common commands about the shell

Ls-lat list all the stuff in the current directoryLs-lath people look at the sizeLs-f | grep "/$" only DirectoryLS-LR include subdirectories ...LS--ignore filename-lt ignores a Which, in the path specified by the path variable, searches to see if a

Special characters for Shell scripts

1. #注释作用, #! Except in addition, in the parameter replacement echo ${path#*:} here does not represent the comment, the numeral conversion, does not represent the comment echo $ ((2#101011)) 2. Command line delimiter, you can write multiple commands

Shell Scripting Exercise 001

1. Practice Yourself#!/bin/basha=0while:d o a= ' expr $a + 1 ' if [$a-lt 4]then echo-n-E "input number 1 to 9 \ n" read Num case $Num in 1|2|3|4|5|6 |7|8|    9) Echo-e "You are number is: $Num!"   ;;    *) echo "R error number, game over!"  break;;

Shell Learning Note III (escaping and referencing)

Tag:shell    reference     escape     command replace     Escape and reference two types of characters: normal character and escape character escaping: "\" Example: 1, Echo $Dollar 2, echo \ $Dollar 3, Ech O? Characters that need to be

Under CentOS, the shell script enclosed in single quotes does not perform a workaround

Example one;Touch test.shVI test.shInputTest= ' echo ' test* "|grep [a-za-z0-9] |wc-c 'Echo $testSave, Exit VI;SH test.shResult: Echo "test*" |grep [a-za-z0-9] |wc-cDescription not implemented;We modify a pair of single quotes to $ () and the result

Shell Learning Note Nine (redirect)

REDIRECT concept: Change the default input and output to another input/output file identifier Linux uses 0-9 to indicate the data flow associated with a particular process, and the system will open three files for that process when it starts a

Linux Shell six flow control--loop

One, for loop The For loop works by taking the serial element one by one out, putting it into the specified variable sequentially, and repeating the contained command area (between do and done) until all the elements takeUntil the end. Where serial

Learn about the--shell script for Linux with brother Bird

From the programmer's point of view, the shell itself is a program written in C language, from the user's point of view, the shell is the user and the Linux operating system communication Bridge. The user can either enter command execution or use

Linux Series-shell Learning Notes (cont.) Handling User Input

1. Running a program with parameters$ A indicates the name of the program, which represents the first argument, and the second argument, and so on, until the nineth parameter $9# VI Factorial#!/bin/shf=1for ((i=1;iTest:[Email protected]

Shell Programming---Character testing and for loops

A. Character test= =: Test for equality, equality is true, not equal to False! =: Test Whether it is unequal, not equal to true, etc as false>-N String: Tests whether the specified string is empty, empty is true, or false-Z String: Tests whether the

〖linux〗 simply package the shell and some files into a separate "executable file"

Sometimes to share a tool with others, but also need to provide more documents;If sharing a compressed package also have to teach each other how to extract, execute which script, feel the need to transfer more content is inconvenient;A few shell

Shell problem case and three Musketeers awk and sed settlement practice

20150418 Weekend Quiz raw data: 17/apr/2015:09:29:24 +080017/apr/2015:09:30:26 +080017/apr/2015:09:31:56 + 080018/apr/2015:09:34:12 +080018/apr/2015:09:35:23 +080019/apr/2015:09:23:34 +080019/apr/ 2015:09:22:21 +080020/apr/2015:09:45:22 +0800

Shell Learning Note (2) Replace command • • The difference from ()

· CMD in the execution of the shell regardless of · What is the content of, advanced interpretation, and then the interpretation of the final results to the shell, if the result of interpretation is not the shell can command, will be error. However,

Shell Learning Notes (1)-Variables

1, the variables in the shell can be customized, the shell uses the variable with the $Name= "Shero"echo "Hi ${name}"[Email protected]:/home/shero/shell#./test2.shHi SheroNote that there can be no spaces between the variable name and the equals sign,

Array Bash shell

Http://www.cnblogs.com/chengmo/archive/2010/09/30/1839632.html#!/bin/The bash# script detects an offline host opportunity to send an email notification that can be run all the time. # Please set mail gatewany IP lastip Four items according to your

Linux series-shell learning notes (Continued 1) process user input,-shell learning notes

Linux series-shell learning notes (Continued 1) process user input,-shell learning notes 1. Run the program with Parameters $0 indicates the program name, $1 indicates the first parameter, $2 indicates the second parameter, and so on until the ninth

Total Pages: 541 1 .... 382 383 384 385 386 .... 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.