#!/bin/sh if [ $# -eq 0 ] ; then echo "uasge: lsfiles file1 [ file2 ... ]" exit 1 fi for i do if [ ! -f "$i" ]; then echo "lsfiles: Can't read $i" >&2 echo else echo "$i" for j in `cat $i` ; do if [ -f "$j" -o -d "$j" ]; then echo "$j" fi done echo fi done