#!/bin/bash

for i in 1 2 3 4 5 6 7 8 9
  do
  for j in 1 2 3 4 5 6 7 8 9 0
    do
	echo hi > test1
	echo lo > test3
	(sleep 1; cat test1) <test1 &
	(sleep 1; cat test2) <test2 &
	cat test1
	cat test3
    done
done
