(in)frequently updated log of stuff

entertaining dozens of readers since 1997

Tuesday, April 17, 2007

The friend-o-delete-o-matic 2000

I wrote up a new script. Feel free to modify it to suit your needs. I offer consulting at very affordable rates if you're uncomfortable with bash.


#!/bin/bash
# for best results, run from cron every 1 minute

HOUSE=/home/jake

ls -1 $HOUSE | while read GUEST ; do

case $GUEST in
dave) rm -f $HOUSE/$GUEST ;;
*) ;;
esac


done

Labels: