#!/bin/sh if cat $1 > /dev/null 2>&1 ; then echo "cat $1 worked just fine" else echo "cat $1 returned with an error" fi