This page is about the management of time variable in Bash.
Format Instant - String Format (ISO 8601)
date -u +"%Y-%m-%dT%H:%M:%SZ"
mv OPatch OPatch.bkp_$(date -u +"%Y-%m-%d.%H:%M")
# or
date -u +"%Y-%m-%d_%H.%M.%S"
Conditional Double Bracket example
[[ $(date) =~ ^Fri\ ...\ 13 ]] && echo "It's Friday the 13th!"
Name | Double Bracket operator | Single Bracket Operator |
---|---|---|
RegularExpression matching | =~ | (not available) |