#!/bin/sh #The directory where the configuration files lie keydir=/tmp/keys/*.zip #The directory where used configuration files go useddir=/tmp/used_keys #get the one file x=`ls -d $keydir | head -n 1` echo "Content-Type: application/zip echo cat $x && mv $x $useddir/`basename $x`