ls -1 | perl -e 'srand; rand($.) < 1 && ($filename = $_) while <>; print
$filename;'

 - Barry

--
Barry Byrne, IT Manager,
WBT Systems, Block 2, Harcourt Centre
Harcourt Street, Dublin 2, Ireland

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Walter
> Sent: 21 August 2003 17:36
> To: Questions
> Subject: file picker
>
>
> Hi All,
>
>     I want to run a cron job to upload a different image
> file to a web site as a new background every night.
>
>     I need a way to automatically select a different file
> from a directory which I will populate over time, and
> then feed that name to the upload script.  I can't find
> anything like this in the ports.  Can someone suggest
> a utility, script, et cetera, for this?  Otherwise, I'm
> prepared to write my own, but I don't want to re-invent
> the wheel, as the saying goes.  Thanks.
>
>     Please CC me as I'm not currently subscribed to the
> List.
>
> Walter
>
> _______________________________________________
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to