How to test the correctness of shell scripts

In the actual work, the shell script needs to be tested for correctness.How to test in the quickest and most effective way?A lot of development habits are, apart, write/Get, run a, see input, output, want to do the operation is completed, also

Shell script Programming {2} per day

redirect$echo "Test Redirect" > Temp.txt--Writes the output to the Temp.txt,temp.txt file is first emptied.$echo "Test redirect Second" > Temp.txt-Append the output to the temp.txt.File descriptor0--stdin Standard Input1--stdout Standard

GitHub's use (Git Shell)

I am not clever and understanding something are not quick. Even so,i can ' t be scared for facing it. Practice more and practice more. Don ' t stop your passion. Recently to work on GitHub with small partners to do projects, my github ....

The Shell gets the Linux server's MAC (generic, does not depend on the NIC name)

Sometimes the server vendors will make their own naming rules, such as some of Dell's server network card name may be the beginning of EM, such as EM1, and sometimes the beginning of the ETH, such as eth0, which let us get the network card command

The shell thing.

Which language is most helpful to you in your daily work? I think it's a non-shell. The earliest contact with the shell should be in college, such as the Linux file system cut will use some commands, such as Find, tar, Xargs, CP and so on, and put

The Shell Three Musketeers grep

Objective How did grep get out?It's going to take us discovering, "g/re/p" see, that's it. "Global Regular expression print" ==> "globally finds the regular expression (RE) and prints the resulting row. ”The grep family consists of commands

Linux, Shell scripting Brute force user name and password

Because some registered user account rules can follow, and usually people's awareness of the poor, the password is relatively simple, the user name of the common password login test, to break the password.For learning purposes only, do not use for

Shell Bash determines whether a file or folder exists

Shell Bash determines whether a file or folder exists1, #如果文件夹不存在, create Folders folder="Log"if[!-D"${folder}" ]; Then mkdir ${folder}fi2To determine if a file exists.="/var/www/log.txt"# -The f parameter determines whether the $file

Shell Daily Case (i)

 Orderdeveloped under the Linux platform, we are often exposed to tasks of the nature of the work, and the processing methods are diversified. Now accumulate each case. Cleaning up the data log files for nearly 7 days is getting bigger, and we need

Shell Learning: sed command

  Http://blog.sina.com.cn/s/blog_a56ef5490101cn58.htmlSed is a good file processing tool, itself is a pipe command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work, the

Shell Script Integer Comparison

1. Integer comparison -eq equals, such as:if [ "$a"-eq " $b"] -ne not equal to, such as:if [ "$a"-ne " $b"] -GT greater than, such as:if [ "$a"-gt " $b"] -ge greater than equals, such as:if [ "$a"-ge " $b"] -lt less than, such as:

Reproduced Shell deletes scripts for various annotations

Transferred from: http://www.cppblog.com/zhangyq/archive/2010/10/08/127915.html1.txt content:File contentAabbccAbcdefgHilkdifdfdfMmmmmmmmEeeeeeeeeeeeeeComment Part 2>>>DdeeffSED-E ": Begin; />>/{/>>>/! { $! {N; b begin}; }; s/>>//; };" 1.txtFile

Shell Programming Basics

For C in a B C D E F g;do echo $c; Done sequentially outputFor C in a B C D E F g;do tar czvf install.log. $c. tar.gz Install.log; DoneFor C in {a.. g}; do echo $c; Done the same as aboveSeq 1 10 columns of numbersFor i in {1..10}; do echo $i;

Shell Exercises Explained

Write a script that calculates all the odd and all the even numbers within 100 and displays them separately#! /bin/bashSum1=0For i in ' SEQ 1 2 100 'Dosum1=$[$sum 1+ $i]Doneecho $sum 1Sum2=0For j in ' SEQ 2 2 100 'Dosum2=$[$sum $j]DoneEcho $sum

Bash Shell Foundation II conditional judgment

if condition judgment; ThenStatmentElseStatmentFiOrif condition judgment; ThenStatmentElifStatmentFiAnti-quote: Returns the execution result of the command to the variable.Set UserIDUserID = ' Id-u user1 'command to end a script prematurely: exit:

September 13, 2015 and 15th "shell, Sed&awk use (i)"-jy1506402-19+liuhui880818

Directory:First, the operation Principle of shell programSecond, Shell common skills1. Command history2. Command aliases3. Command Reference4. File name Wildcard5. Common shortcut keys6. Complement function7. Input and output redirection and piping8.

Shell Script Foundation Advanced (i)----shell introduction

Shell Introductionbash programming, then start with the programming, What is the program first? Personal words Explanation: program is the process of processing data. So, The program design consists of : program = data structure +

Shell detailed introduction and programming (ON)

Shell Introduction The shell is a programming language interpreter, which interprets commands entered from the keyboard, and also explains the sequence of commands stored in the script, which is a file containing a series of commands, and

Shell Array related Operations

Reference: http://www.cnblogs.com/chengmo/archive/2010/09/30/1839632.htmlCreate an arrayA= (12345)Get array length${#a [@]} #${#变量} to get variable length ${#a [*]}Print array ContentsEcho ${a[@]} #echo $a print only the first element of the

Scala VS python2 (Linux or shell) not completed

PS: Only consider the latest version of Scala and python2.x, due to the difference between python3.x and python2.x, and the mainstream of some open source projects are used Python2, currently python2 a little bit compatible python31.

Total Pages: 541 1 .... 469 470 471 472 473 .... 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.