1월, 2017의 게시물 표시

Shell in a nutshell - Testing, Looping and Branching

이미지
Shell in a nut shell - Testing, looping and branching (new) Image source Reference I referred to Chapter 3 from “Pro Bash Programming Scripting the GNU/Linux Shell” written by Christ F.A. Johnson. Please read this book if you would like to get more information. You can get this book from this site. Exercise script. (Chapter 3) I wrote an exercise script and you can download it from this link. What is looping and branching in bash? Looping is very frequently used in the programming languages. It runs iteratively and passes the arguments to the next command line. There are three types of loop such as for , while , and until . Branching refers to conditional executions such as if and case because these executions have a type of programming flow that traverses a tree. It sounds pretty reasonable because conditional execution evaluates a given condition and then chooses the branch if the condition is acceptable. Testing arguments and variables...