Skip to content

Instantly share code, notes, and snippets.

@gasp
Created November 27, 2017 11:20
Show Gist options
  • Select an option

  • Save gasp/7939938b478172c7ad86754e55642512 to your computer and use it in GitHub Desktop.

Select an option

Save gasp/7939938b478172c7ad86754e55642512 to your computer and use it in GitHub Desktop.

Revisions

  1. gasp created this gist Nov 27, 2017.
    14 changes: 14 additions & 0 deletions multiple.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/usr/bin/env bash

    sleep_date() {
    echo "starting $1 at $(date)";
    sleep $1;
    echo "ending $1 at $(date)";
    }

    echo "starting all $(date)";
    sleep_date 10 &
    sleep_date 20 &
    sleep_date 15 &
    wait;
    echo 'ended';