Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 bash 中使用 printf 打印格式化的系统日期 + 主机名。
像printf "%s:%s\n" date hostname什么?
printf "%s:%s\n" date hostname
printf "%s:%s\n" "$(date)" "$(hostname)"