#!/bin/sh
rm -f out1 out2 csh-out shell-out
echo "Test7: Pipes and output redirection"
echo "cat file1.cc | grep malloc > out1" > shell-in
echo "cat file1.cc | grep malloc > out2" > csh-in
/bin/sh < csh-in > csh-out
../shell < shell-in > shell-out

diff out1 out2
if [ $? -ne 0 ]
then
    echo "Test7 failed"
    exit -1
fi
echo Test7 OK
exit 0
