I believe this will work:

this is perl, by the way, and you may need to change it a bit.

#!/usr/bin/perl

($day,$month) = (localtime)[3,4];

$day = $day-1;

if ($month<10) { $month = "0$month" }
if ($day<10) { $day = "0$day" }

open(TMP, ">tempscript")
print TMP "cd ../$month$day\n";
print TMP "chmod -r 644 *\n";
close(TMP);
open TMP,"|chmod 700 tempscript"
close TMP


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to