首先来看看这个问题: Bash或GoogleCL:字符串参数中的新行
我想现在在"摘要"中添加一个变量$ {date}:
google youtube post ~/videos/cat-falls-down-stairs.avi Comedy \
--tags 'currency of the internet' \
--summary $'Today is ${date}. Poor whiskers takes a tumble.\nShe'\''s fine, though, don'\''t worry.'
Run Code Online (Sandbox Code Playgroud)
但变量不会在bash中的单引号内扩展.
有可能这样做吗?
注意:GoogleCL是一个用python编写的命令行程序.我使用的是Python 2.6的Ubuntu 10.10.