TODAY=$(date +'%Y%m%d') # looks like: 20221025 / YYYYMMDD TODAY=$(date +'%Y-%m-%d') # looks like: 2022-10-25 / YYYY-MM-DD # For more, google "bash get date format"