#!/bin/sh ls -t $1 | ( read keepthisone while read movethisone do echo $2 $movethisone $3 done )