【发布时间】:2021-11-04 22:41:34
【问题描述】:
我想从命令行格式化字符串:make post title='This is a hello world post!'。标题字符串的格式应为:$(title) | tr ' ' '-' | tr '[:upper:]' '[:lower:]'。
MakeFile 创建一个新的 Hugo 博客条目:
post:
@echo "New post: $(title)"
hugo new posts/"$(shouldBeFormattedTitle)".md
问题是,我如何将上述tr 命令(或替代命令)用于shouldBeFormattedTitle?
【问题讨论】: