#!/bin/bash if [ "$1" ] then while read f do f="${f#-}"; f="${f%-}" [ -f "$f" ] && md5sum "$f" || ls -ld $f done <