perl -e 'print (int((-M shift)*60*60*24)||1)' script_file