About 69,500 results
Open links in new tab
  1. Looping Statements | Shell Script - GeeksforGeeks

    Jan 3, 2024 · Looping Statements in Shell Scripting: There are total 3 looping statements that can be used in bash programming. To alter the flow of loop statements, two commands are used they are, Their descriptions and syntax are as follows:

  2. 9 Examples of for Loops in Linux Bash Scripts - How-To Geek

    Oct 30, 2023 · All scripting and programming languages have some way of handling loops. A loop is a section of code that you want to have executed repeatedly. Rather than type the same set …

  3. unix - Shell script "for" loop syntax - Stack Overflow

    If you don’t have to be totally POSIX, you can use the arithmetic for loop: max=10 for (( i=0; i < max; i++ )); do echo "output: $i"; done Or use jot (1) on BSD systems:

  4. Bash Scripting - For Loop - GeeksforGeeks

    Sep 15, 2023 · We can use loops and conditional statements in BASH scripts to perform some repetitive and tricky problems in a simple programmatic way. In this article, we are going to focus on the for loop in BASH scripts.

  5. Using for loops and while loops in a shell script - The Shell Scripting ...

    Most languages have the concept of loops: If we want to repeat a task twenty times, we don't want to have to type in the code twenty times, with maybe a slight change each time. As a result, we have for and while loops in the Bourne shell.

  6. Using For, While and Until Loops in Bash [Beginner's Guide]

    Learn for, while and until loops with examples in this chapter of Bash Beginner Series. Beware of infinite loops! The ability to loop is a very powerful feature of bash scripting. Loops have a variety of use cases. In this tutorial, you will explore the three different bash loop structures.

  7. Unix Shell Loops - Online Tutorials Library

    A loop is a powerful programming tool that enables you to execute a set of commands repeatedly. In this chapter, we will examine the following types of loops available to shell programmers −. The while loop; The for loop; The until loop; The select loop; …

  8. Loops - Bash Scripting Tutorial

    Loops allow us to take a series of commands and keep re-running them until a particular situation is reached. They are useful for automating repetitive tasks. There are 3 basic loop structures in Bash scripting which we'll look at below.

  9. Bash For Loop Examples - nixCraft

    Jan 31, 2025 · A bash for loop is a bash programming language statement which allows code to be repeatedly executed. A for loop is classified as an iteration statement i.e. it is the repetition of a process within a bash script. For example, you can run UNIX command or task 5 times or read and process list of files using a for loop.

  10. 16 Examples of For Loop in Shell Script [Free Downloads]

    Mar 13, 2024 · This article presents hands-on examples on the topic of for loop in Shell Script. It covers all possible for loop syntaxes that can be useful to a user while creating loop-based scripts. Moreover, the practical examples are divided into two categories: Basic Shell Scripts and Task-Specific Shell Scripts.

  11. Some results have been removed
Refresh