FORMAT date command input space of several methods

1.date +% Y-% m-% d \ (a space)% H:% M:% S

This command with the escape character \, will escape out of space

2.date +%Y-%m-%d'  '%H:%M:%S

This command within the single quotation marks may be one or more spaces, so that the output result also one or more spaces

3.date +'%Y-%m-%d   %H:%M:%S'  或  date +"%Y-%m-%d   %H:%M:%S"

Single or double quotation marks to enclose FORMAT partially completed, so that the number of intermediate spaces, there are many spaces output

Guess you like

Origin www.cnblogs.com/gchen-frank/p/11572531.html