ILLPHATED dot COM

 
 

MACOS run 3x commands terminal in parallel and single threaded

NORDVPN_ILLPHATED
SHARE THIS NOW!

illphated

run_parallel_loop.sh

3X IN A ROW 1 by 1




#!/bin/bash

NORDVPN_ILLPHATED

# Replace this with your actual command
COMMAND=”echo Running your command”

# Repeat 99 times
for i in {1..99}
do
echo “Round $i…”

# Run 3 commands in parallel
$COMMAND &
$COMMAND &
$COMMAND &

# Wait for all 3 to finish before the next round
wait
done

3x SAME TIME

#!/bin/bash

# Replace this with your actual command
COMMAND=”sleep 5″ # Example command (replace with yours)

# Run 99 loops
for i in {1..99}
do
echo “=== Round $i ===”

# Run 3 instances in the background
eval “$COMMAND” &
eval “$COMMAND” &
eval “$COMMAND” &

# Wait for all 3 to finish before looping again
wait
done

EmailURL

3 thoughts on “MACOS run 3x commands terminal in parallel and single threaded”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top