Testing For File Charactereristics

commandline session $cat test.sh #!/usr/bin/env bash # cookbook filename: checkfile # DIRPLACE=/tmp INFILE=/home/jeffrin/amazing.data OUTFILE=/home/jeffrin/more.results if [ -d “$DIRPLACE” ] then cd $DIRPLACE if [ -e “$INFILE” ] then if [ -w “$OUTFILE” ] then doscience > “$OUTFILE” else echo “can not write to $OUTFILE” fi else echo “can not read from $INFILE” fi else echo …