You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bash built-ins tend to be faster than external commands and preferred for shell scripts. date can be easily replaced with printf time format, like this example:
$ time date +%Y-%m-%d
2022-05-28
real 0m0,001s
user 0m0,001s
sys 0m0,000s
$ time printf "%(%Y-%m-%d)T"
2022-05-28
real 0m0,000s
user 0m0,000s
sys 0m0,000s
It kinda keeps the date format. Plus, it can be used to directly set variables with the -v option.
Just type printf --help for more info :D
The text was updated successfully, but these errors were encountered:
Bash built-ins tend to be faster than external commands and preferred for shell scripts.
date
can be easily replaced withprintf
time format, like this example:It kinda keeps the
date
format. Plus, it can be used to directly set variables with the-v
option.Just type
printf --help
for more info :DThe text was updated successfully, but these errors were encountered: