#!/bin/sh

exec 3<data1.i
exec 4<data2.i

cat <&4 | while read H; do
	cat <&3 | while read F; do
		echo $H $F
	done
done

#!/bin/sh

exec 4<data2.i

function f() {
	exec 3<data1.i
	cat <&3 | while read F; do
		echo $H $F
	done
}

cat <&4 | while read H; do
	f
done

Fix the example to provide expected results.
Fix the example to provide expected results.
