1
我想通過EC2中的shell腳本發送AWS SNS通知。以下是我的命令:在shell腳本中向AWS SNS消息添加換行符
aws sns publish --topic-arn arn:aws:sns:x:x:x \
--region=$AWS_DEFAULT_REGION \
--subject "Processing Error - ${tablename}" \
--message "An error has occurred in API data processing. The error file ${error_file} has been written to the errors folder...The file contents of ${error_file} are : $(cat ${error_file})"
我的問題是,我不知道我怎麼可以插入新行我打印使用「cat
」命令文件的內容之前?我想在換行後打印文件的內容。現在它被追加到"The file contents of ..."
。
如何在--message
參數中添加換行符?
非常感謝魯斯蘭...的解決方案是有幫助問題解決了 – Akki