#!/bin/bash rm -f csh-out shell-out echo -e "\033[1;4;93mTest_cd4: cd notfound >& err\033[0m" echo "Test_cd4: cd notfound >& err1" echo "cd notfound >& err1" > shell-in echo "pwd" >> csh-in ../shell < shell-in > shell-out 2>&1 grep "No such file or directory" err1 if [ $? -ne 0 ] then echo -e "\033[1;31m$0 Failed\033[0m" exit -1 fi echo -e "\033[1;32m$0 Passed\033[0m" exit 0