I think this should work, irrespective of how often and when you run it …
date -d "yesterday 13:00" '+%Y-%m-%d'
More Related Contents:
- How to redirect output to a file and stdout
- How to kill a child process after a given timeout in Bash?
- ./configure : /bin/sh^M : bad interpreter [duplicate]
- The ‘eval’ command in Bash and its typical uses
- How to join multiple lines of file names into one with custom delimiter?
- Linux: copy and create destination dir if it does not exist
- How to redirect the output of the time command to a file in Linux?
- How to handle more than 10 parameters in shell
- How to count lines in a document? [closed]
- Changing default shell in Linux [closed]
- Linux Script to check if process is running and act on the result
- Example of using named pipes in Linux shell (Bash)
- Escape filenames the same way Bash does it
- Syntax error: “(” unexpected — with !(*.sh) in bash script
- Execute command after every command in bash
- How can I find out a file’s MIME type (Content-Type)?
- How to exit if a command failed? [duplicate]
- How can I run a Windows executable from WSL (Ubuntu) Bash
- What does ‘bash -c’ do?
- Using colors with printf
- Identify user in a Bash script called by sudo
- how to detect invalid utf8 unicode/binary in a text file
- Running shell script in parallel
- linux bash, camel case string to separate by dash
- File names with spaces in BASH
- What’s the point of eval/bash -c as opposed to just evaluating a variable?
- Counter increment in Bash loop not working
- Start script after another one (already running) finishes
- Problem with Bash output redirection [duplicate]
- Why exit code 141 with grep -q?