From 99c95d1dfa05bc006411897be3125cd5e7354314 Mon Sep 17 00:00:00 2001 From: ray Date: Sun, 17 Sep 2023 19:09:47 +0100 Subject: [PATCH] update --- bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 5d4bc2d..c79dbc0 100644 --- a/bashrc +++ b/bashrc @@ -10,9 +10,9 @@ function show_date() { # Define the dot file to store the selected adjective dotfile="$HOME/.adjective_of_the_day" - # Check if the dot file exists and was modified less than 1 day ago + # Check if the dot file exists and was modified since yesterday if [[ -f "$dotfile" && $(date -d "$(stat -c %y "$dotfile")" +%s) -ge $(date -d 'yesterday' +%s) ]]; then - # If the dot file exists and was modified less than 1 day ago, + # If the dot file exists and was modified since yesterday # read the stored adjective from the file selected_adjective=$(cat "$dotfile") else