Update: I also wrote a test for this program, I would like you to give me feedback about it as well. How can I improve it
#!/bin/bash
# get the testing utilities
. $(dirname "$0")/testutil.sh
CMD="tee"
# test for stdout only
run_test "tee stdout only" < file.txt
# test for stdout and a directory
run_test "tee stdout and directory" .. < file1.txt
TEMP_FILE1=`mktemp`
TEMP_FILE2=`mktemp`
# test for stdout and multiple files
run_test "tee stdout and multiple files" $TEMP_FILE1 $TEMP_FILE2 < file1.txt
# test for stdout and inaccesible file
chmod 000 $TEMP_FILE1
run_test "tee stdout and inaccesible file" $TEMP_FILE1 < file1.txt
# cleanup
rm -f $TEMP_FILE1 $TEMP_FILE2