Skip to content

Commit

Permalink
Add parallel-tasks.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-nath committed Sep 10, 2022
1 parent cb1ca9d commit 6fa34af
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripting/parallel-tasks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

function task1() {
echo "Running task1..."
sleep 5
}

function task2() {
echo "Running task2..."
sleep 5
}

task1 &
task2 &

wait

echo "All done!"

0 comments on commit 6fa34af

Please sign in to comment.