How do i run a for loop in bash one after another

belo

I have about 100 files in a folder but I would like the for loop in bash to run one after the other and not all at once. This is my script on the command line:
for i in *.fasta; some program here & done

This runs the script in the background and does all 100 files at once which crashes my server because it is memory intensive. I would like it to run one after the other automatically.

thanks!

gae123
for i in *.fasta; do some program here; done

or if you want to run the whole loop in the background

for i in *.fasta; do some program here ; done &

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Do commands in a bash script run in parallel or one after another?

From Dev

Run multiple scripts one after another in bash

From Dev

How do I run a for loop on the command line as root in bash

From Dev

How do I position JButtons vertically one after another?

From Dev

How do I make objects disappear after another one touches it?

From Dev

How do I position JButtons vertically one after another?

From Dev

How do I read two inputs one after another in node?

From Dev

how to run function after another one completes

From Dev

I run zsh from bash after connecting SSH – how can I exit both with only one command?

From Dev

I have a PHP script that repeats the same set of task 30 times. How do I break it into pieces that will run one after another to avoid a timeout?

From Dev

How can I run one gulp function after another in a javascript function?

From Dev

How do I run bash command with "while" loop in desktop entry without having to create a ".sh" file?

From Dev

How do I run another file in python?

From Dev

How do I run another file in python?

From Dev

How do I run a Liquibase changeset on one type of db but then have LIquibase ignore it for another type?

From Dev

How do I run a Liquibase changeset on one type of db but then have LIquibase ignore it for another type?

From Dev

Systemd: How do I make sure one unit doesn't run if another is?

From Dev

I want to execute the commands in a loop at the same time, not one after another

From Dev

How do I run this bash script in ubuntu?

From Dev

How do I run two processes and find out when one ends in bash

From Dev

How do I run a command in bash from zsh (or some other shell) in one line?

From Dev

How do I run multiple while loops that switch off after each loop round?

From Dev

How do I run multiple while loops that switch off after each loop round?

From Dev

Selenium Webdriver: How do I run multiple tests, one after the other in the same window?

From Dev

How do I run selenium test one after the other on multiple browser

From Dev

How to plan a task to run after another already running task in bash?

From Dev

How do I change one username to another?

From Dev

How do I restore the sprite into original image after swapped it to another one in coco2dx?

From Dev

how do I send procedural requests (one after the other) with loop from angular factory?

Related Related

  1. 1

    Do commands in a bash script run in parallel or one after another?

  2. 2

    Run multiple scripts one after another in bash

  3. 3

    How do I run a for loop on the command line as root in bash

  4. 4

    How do I position JButtons vertically one after another?

  5. 5

    How do I make objects disappear after another one touches it?

  6. 6

    How do I position JButtons vertically one after another?

  7. 7

    How do I read two inputs one after another in node?

  8. 8

    how to run function after another one completes

  9. 9

    I run zsh from bash after connecting SSH – how can I exit both with only one command?

  10. 10

    I have a PHP script that repeats the same set of task 30 times. How do I break it into pieces that will run one after another to avoid a timeout?

  11. 11

    How can I run one gulp function after another in a javascript function?

  12. 12

    How do I run bash command with "while" loop in desktop entry without having to create a ".sh" file?

  13. 13

    How do I run another file in python?

  14. 14

    How do I run another file in python?

  15. 15

    How do I run a Liquibase changeset on one type of db but then have LIquibase ignore it for another type?

  16. 16

    How do I run a Liquibase changeset on one type of db but then have LIquibase ignore it for another type?

  17. 17

    Systemd: How do I make sure one unit doesn't run if another is?

  18. 18

    I want to execute the commands in a loop at the same time, not one after another

  19. 19

    How do I run this bash script in ubuntu?

  20. 20

    How do I run two processes and find out when one ends in bash

  21. 21

    How do I run a command in bash from zsh (or some other shell) in one line?

  22. 22

    How do I run multiple while loops that switch off after each loop round?

  23. 23

    How do I run multiple while loops that switch off after each loop round?

  24. 24

    Selenium Webdriver: How do I run multiple tests, one after the other in the same window?

  25. 25

    How do I run selenium test one after the other on multiple browser

  26. 26

    How to plan a task to run after another already running task in bash?

  27. 27

    How do I change one username to another?

  28. 28

    How do I restore the sprite into original image after swapped it to another one in coco2dx?

  29. 29

    how do I send procedural requests (one after the other) with loop from angular factory?

HotTag

Archive