loop in unix / linux

  • Loop in Unix / Linux Loop in Unix / Linux a loop is a program that has powerful features, allowing you to repeat a set of commands. in this chapter, you will learn through practical examples of loops contained in shell programs.
  • The while loop in Shell The while loop in Shell the while loop gives you the ability to execute a set of repetitive commands until certain conditions occur. it is often used when you need to manipulate iterative variable values.
  • For loop in Shell For loop in Shell the for loop works on lists of items (items). it repeats a set of commands for each item in a list.
  • Until loop in Shell Until loop in Shell the while loop is perfect for the situation where you want to execute a set of commands while some conditions are true. sometimes you need to execute a set of commands until a condition is true, then you need to use a until loop.
  • Select loop in Shell Select loop in Shell the select loop provides an easy way to create a numbered menu from which the user can select. it is useful when you want to ask the user to select one or more items from a list of options.