This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/data/backup/$TODAY#!/bin/bash -e | |
read -r YESTERDAY TODAY <<<$( | |
python3 -c ' | |
import datetime | |
def day_to_slot(n): | |
return bin(n)[::-1].index("1") | |
n = datetime.date.today().toordinal() | |
print(day_to_slot(n - 1)) | |
print(day_to_slot(n)) |