About 28,000 results
Open links in new tab
  1. 9 Examples of for Loops in Linux Bash Scripts - How-To Geek

    Oct 30, 2023 · The versatile Bash for loop does much more than loop around a set number of times. We describe its many variants so you can use them successfully in your own Linux scripts.

  2. Looping Statements | Shell Script - GeeksforGeeks

    Nov 17, 2025 · Loops are a fundamental part of programming, and shell scripting is no exception. They allow you to automate repetitive tasks by running a block of code multiple times.

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

    Aug 18, 2025 · In this tutorial, you will explore the three different bash loop structures. You will also learn how to use loops to traverse array elements. Furthermore, you will learn how to use break and …

  4. Bash For Loop: Syntax and Examples - Linuxize

    Mar 2, 2026 · A complete guide to the Bash for loop: standard syntax, C-style loops, arrays, ranges, break and continue, and real-world scripting examples.

  5. Bash For Loop Examples - nixCraft

    Jan 31, 2025 · Explains how to use a Bash for loop control flow statement on Linux / UNIX / *BSD / macOS bash shell with various programming examples.

  6. Bash Loops - W3Schools

    Using Loops in Bash This section covers the use of loops in Bash scripting, including for, while, and until loops.

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

    Loops - A Bourne Shell Programming / Scripting Tutorial for learning about using the Unix shell.

  8. Unix / Linux - Shell Loop Types - Online Tutorials Library

    In this chapter, we will discuss shell loops in Unix. 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 …

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

    Ideally, such a shell invoked as sh would only support those features in the POSIX standard, but by default let some of their extra features through. The C-style for-loop is not a POSIX feature, but may …

  10. Bash For Loop: A Comprehensive Guide to Iteration in Shell Scripting

    Jan 16, 2026 · This guide will take you from the basics of Bash `for` loops to advanced techniques, with practical examples, best practices, and troubleshooting tips. By the end, you’ll be equipped to write …