shell - = : This is not an identifier

标签 shell unix scripting ksh

我正在尝试使用

 export DB_URL = jdbc@xyz.com
在 KornShell (ksh) 脚本中设置环境
但我收到 =: This is not an identifier请协助。

最佳答案

不要在变量名、等号和它的值之间放置空格。

export THIS=that

或者
THIS=that; export THIS

关于shell - = : This is not an identifier,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5396361/

相关文章:

string - 将 UUID 转换为 String 以插入 mongodb

c - C 中的简单 Shell

linux - 基于多种模式重命名文件的更好方法

bash - 使用 bash 脚本的未绑定(bind)变量

Python 脚本不会通过在 Windows 上双击来执行

linux - 如何解析 zsh/shell 脚本中的问号作为参数?

html - 以HTML格式生成Shell脚本输出并发送邮件

Bash 还是 Bourne 脚本?

c - 一个变量被声明为 float f = 5.2 但是在使用打印 %d 时,我没有得到 o/p as 5 它打印了一些垃圾值

linux - 使用 sed 将大写字母替换为小写字母,将空格替换为下划线,然后创建一个带有结果的 xml 文件