Эта команда должна работать.
paste -s tmp1 tmp2 -d '\n' tmp3 -d '\n' tmp4 tmp5 tmp6 > tmp7
$hi
поэтому результирующий скрипт будет таким:
if diff -q $hi $hello; then
echo "these files are the same"
else
echo "these files are not the same"
fi