linux - TFS 2017 - 在 shell 脚本中使用双反斜杠进行变量替换

标签 linux bash shell

我正在尝试使用 shell 脚本任务用双反斜杠替换变量,我的环境变量配置为使用双反斜杠。

在 bash 脚本中替换 时,TFS 只放置一个反斜杠。

变量: enter image description here

脚本中的替换,由于连接字符串中有空格,我使用双引号:

enter image description here

执行日志:

enter image description here

我什么都试过了,放了更多的反斜杠,加了一个引号,但没有任何效果。

感谢您的帮助。

谢谢

最佳答案

您需要在变量中输入 \\\\\\\\:

CONNECTION_STRING: Data Source=192.168.2.227\\\\\\\\COMMERCE

关于linux - TFS 2017 - 在 shell 脚本中使用双反斜杠进行变量替换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50181410/

相关文章:

linux - 为什么我在 shell 脚本中得到 "non -option ARGV element: XXXX"?

c++ - 如何在 Debian 上获得 GCC/++4.6 或更新版本

linux - 如何编写代码以在 linux 中遍历多个文件?

linux - 执行第一行 linux bash 脚本时出错

linux - 遍历进程树

linux - 在 i386 Debian 下编译 amd64

linux - Linux部署中的File.separator

bash - ">!"在 bash 或 nawk 中有什么作用?

mysql - 有没有办法检查 dump mysql import 的加载状态?

Linux 脚本检查进程是否启动