bash - 打印当月{date +%B}说明

标签 bash date unix

打印当前月份的命令是:

date +%B

为什么B前面有一个+和一个%

+ 是否表示插入文件的全部内容,% 是否表示将程序带到前台处理?

最佳答案

+ 表示应格式化日期。

%B 是一个格式说明符,这意味着 date 应打印完整的月份。

有关日期和格式说明符的更多信息,请参阅 here .

关于bash - 打印当月{date +%B}说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22118309/

相关文章:

bash - 当 VSCode 打开工作区时如何运行 bash 命令或设置环境变量

linux - 将 bash 脚本的输出写入带有日期的文件

javascript - 在日期选择器的选择选项中填充日期值

bash - 一个shell脚本如何控制另一个脚本

linux - Bash 脚本 : Storing command with spaces and arguments in variable and then executing

sql - 在 SQL 中按月生成年初至今报告

android - 在Application中显示Android application.apk的创建日期

c - 为什么 scanf 不能正确读取值?

c - 将 st_mode (来自 stat)存储在文件中并在 chmod 中重用它

perl - 是否有类似于 Unix "which"命令的 Perl 模块?