#!/bin/bash ls $1 >/dev/null 2>&1 error=$? echo -n "$1 -" if [ $error -eq 0 ] then echo "$1 - Gut gegangen" else echo "$1 - Pech gehabt" fi