#!/bin/tcsh foreach cat ($*) if (-x $cat) echo $cat " is executable" end