#!/bin/sh # ${R_HOME}/bin/filename ## Using `found' ensures that at least an empty string is returned; ## without, system.file() returns character(0) if nothing is found. found= for f in ${*}; do if [ -r $f ]; then echo "$f"; found=1; fi done test -z "$found" && echo ### Local Variables: *** ### mode: sh *** ### sh-indentation: 2 *** ### End: ***