首先看一下这个问题: 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.'
但是在bash中,单引号内的变量不会扩展。
有没有可能做到这一点?
注意:GoogleCL是一个用Python编写的命令行程序。我使用的是Ubuntu 10.10和Python 2.6。