How to find out the date of the last Saturday in Linux shell script or python? -


i have python script need run daily backups. need find date of last saturday because need in script backups did on last saturdy. suppose

on saturday made file

weekly_user1_jul-13-2013.sql

i ned name in script run daily. script running on saturday need todays date , buif on sunday need last saturday date.

how can that

$ date +"%b-%d-%y" -d "last saturday" jul-13-2013 

Comments