Skip to main content
 首页 » 编程设计

python之.format 在 shell 脚本中等效

2025年04月02日7linjiqin

<分区>

在 Python 中,如果我需要创建一个以日期作为后缀的字符串,我们可以这样做:

date = get_todays_date() 
name = "automation_results_{}'.format(date) 

shell/bash 脚本语言中的.format 是什么?