About 1,340,000 results
Open links in new tab
  1. How do I write a 'for' loop in Bash? - Stack Overflow

    Sep 8, 2008 · The Bash for consists of a variable (the iterator) and a list of words over which the iterator will, well, iterate. So, if you have a limited list of words, just put them in the following syntax:

  2. How do I iterate over a range of numbers defined by variables in Bash?

    Oct 4, 2008 · Related discusions: bash for loop: a range of numbers and unix.stackexchange.com - In bash, is it possible to use an integer variable in the loop control of a for loop?

  3. Looping through the content of a file in Bash - Stack Overflow

    Oct 6, 2009 · The bash $ (<peptides.txt) is perhaps more elegant, but it's still wrong, what Joao said correct, you are performing command substitution logic where space or newline is the same thing. If …

  4. Loop through an array of strings in Bash? - Stack Overflow

    Jan 16, 2012 · Loop through an array of strings in Bash? Asked 13 years, 11 months ago Modified 23 days ago Viewed 2.3m times

  5. Syntax for a single-line while loop in Bash - Stack Overflow

    May 19, 2017 · Syntax for a single-line while loop in Bash Asked 16 years, 4 months ago Modified 2 years, 7 months ago Viewed 1.1m times

  6. How do I loop through only directories in bash?

    For an answer specific to bash (and to some degree, the zsh shell), see the second part of rubo77's wiki answer, where dotglob and nullglob is being used to correctly loop over the directories (or symbolic …

  7. bash - Looping over arrays, printing both index and value - Stack …

    Mar 19, 2017 · Dump array in reusable format (without loop): pure bash, without loop and without fork, using two step, you could build a variable ready to re-define your array elsewhere.

  8. bash - How to make a for loop in command line? - Unix & Linux Stack ...

    Jul 12, 2017 · The syntax of a for loop from the bash manual page is for name [ [ in [ word ... ] ] ; ] do list ; done The semicolons may be replaced with carriage returns, as noted elsewhere in the bash …

  9. bash loop through list of strings - Unix & Linux Stack Exchange

    bash loop through list of strings Ask Question Asked 7 years, 5 months ago Modified 2 years, 9 months ago

  10. bash - Pipe a list of strings to for loop - Stack Overflow

    Apr 10, 2015 · Pipe a list of strings to for loop Asked 10 years, 8 months ago Modified 8 months ago Viewed 25k times