Oct 112011
….I can assure you, if I can’t do it in bash, it doesn’t need to be done…..the other side of the argument was, well, bash isn’t multi-threaded…..hahahahaha …..really??? Run this……
#!/bin/bash
set -m # Enable Job Control
trap '' 2 # disable ctrl + c so you can't stop this bitch
rand=${RANDOM} # lets find some big random number
let POWEROFTWO=${rand}**2 # and since its not big enough, make it ^2
for i in `seq ${POWEROFTWO}`; do # start HUGE num jobs in parallel
echo "99999999999^99999999999" | bc
sleep 1 &
done
# Wait FOREVER for jobs to finish cause you can't stop me now nemo
while [ 1 ]; do fg 2> /dev/null; [ $? == 1 ] && break; done