Bash or GoogleCL: new line in a string parameter

后端 未结 3 1295
孤独总比滥情好
孤独总比滥情好 2021-01-24 13:40

HI, I am using GoogleCL version 0.9.11 to upload videos to Youtube. My OS is CentOS 5.5 and Python 2.5.

One of the string parameters contain new line \"\\n\", and it can

3条回答
  •  一生所求
    2021-01-24 14:28

    You can use Bash's $'' construct to expand escape sequences before they are passed to googlecl.

    google youtube post ~/videos/cat-falls-down-stairs.avi Comedy \
        --tags 'currency of the internet' \
        --summary $'Poor whiskers takes a tumble.\nShe'\''s fine, though, don'\''t worry.'
    

提交回复
热议问题