shell脚本创建YML文件将在“ $”之后删除数据。
我正在尝试从包含SQL查询的Shell脚本中创建YML文件。 示例脚本
cat <<EOF>/test/queryTest.yml
This is a test
sql: "select * from schema.table$name"
这是我运行shell脚本并检查yml文件后的 ,删除了“ $”之后的任何内容 这是我的YML,
This is a test
sql: select * from schema.table
我很感激如何避免这种想法
I am trying to create a yml file from a shell script which includes a sql query.
This is the sample script
cat <<EOF>/test/queryTest.yml
This is a test
sql: "select * from schema.table$name"
After I run the shell script and check the yml file, anything after "$" is removed
This is my yml
This is a test
sql: select * from schema.table
I would appreciate any thoughts on how to avoid this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
逃脱(“ \”)$标志。
Escape ("\") the $ sign.