#!/bin/bash
function sub1()
{
local count=0
while [ "11" != "" ];
do
echo "..............count:${count}" >>./999.log
count=`expr ${count} + 1 `
if [ ${count} -gt 10000 ];
then
echo "exit................."
exit
fi
done
}
function sub2()
{
local count=0
while [ "11" != "" ];
do
echo "..............count:${count}" >>./999.log
count=`expr ${count} + 1 `
if [ ${count} -gt 5000 ];
then
echo "exit................."
exit
fi
done
}
function main()
{
sub1 &
sub2 &
wait
}
main "$@"