Skip to content
  • View menu
  • View sidebar

bioinfo core

Index & solution of bioInfo utilities

  • Home
  • All entries
  • Blogs
  • Contact
  • About

Categories

  • Between languages (7)
  • Blogs (8)
  • Python (35)
  • R (1)
  • Unix (37)

Tags

bedfile Blogs conda Excel html numpy Pandas Python R slurm Unix
04/08/202010/21/2021 by bioinfocore

Unix wait or delay before next command

  • Unix
  • Unix

To avoid memory surge in unix loops, to wait/delay/sleep for a certain among of time:

sleep 2s # seconds (default)
sleep 2m # minutes
sleep 2h # hours
sleep 2d # days

To embed in loops:

for sample in "${sample_list[@]}"
do
(
    yourScript_1.sh "${sample}"
    wait
    yourScript_2.sh "${sample}"
)&
    sleep 10m
done

Source: https://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/

Post navigation

← Previous Post Unix count how many columns in a csv or txt table
Next Post → Sort chromosome
Copyright 2024 | by bioinfocore