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

    Oct 30, 2023 · For each loop, the iterator takes on the value of the next number, string, or whatever data type the loop is iterating over. This allows the loop to work with the values of …

  2. 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, …

  3. 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 …

  4. How do I write a 'for' loop in Bash? - Stack Overflow

    Sep 8, 2008 · I take advantage of Bash's brace expansion to create for loops that allow me to create non-numerical for loops. Example: I want to run the uptime command on frontend hosts …

  5. Looping Statements | Shell Script - GeeksforGeeks

    Jan 3, 2024 · Practical examples illustrate the implementation of loops, including iterating over color values, creating infinite loops, and building an interactive loop for user input validation. …

  6. Bash For Loop Examples - nixCraft

    Jan 31, 2025 · 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 …

  7. 10 Common Bash “for” Loop Examples [Basic to Intermediate]

    Mar 17, 2024 · 10 Common Bash scripting examples of using the "for" loop to generate patterns, different mathematical sequences, passwords, etc.

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

    Mar 13, 2024 · In this article, you will get to learn all about the for loop in Shell Script with the help of practical examples. Similar to all the programming languages, the for loop in Shell Scripting …

  9. 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.

  10. Bash Script for Loop Explained with Examples | phoenixNAP KB

    Dec 15, 2021 · Use the for loop to iterate through a list of items to perform the instructed commands. The basic syntax for the for loop in Bash scripts is: <commands> The element, …

Refresh