Skip to content

Instantly share code, notes, and snippets.

@wkubota
Created November 30, 2015 23:16
Show Gist options
  • Save wkubota/27dd4c64915bd079866d to your computer and use it in GitHub Desktop.
Save wkubota/27dd4c64915bd079866d to your computer and use it in GitHub Desktop.
#!/bin/bash
result="job.rslt"
rm $result
for var in 0 0 0
do
# ./child.sh $var&
ruby child.rb $var&
mypid=$!
echo $mypid
echo $mypid >> $result
done
cat $result | while read line
do
wait $line
if [ $? ]
then
echo "ERROR"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment