Jelastic-如何使用无效的字符来修复Bash_profile,在创建环境变量时输入?
事先,我对我的英语表示歉意。 正是在研究如何解决问题的同时,我发现了Jelastic创建环境变量的建议。没有这些知识,我创建了像在Linux中创建的变量一样,如果发生错误,我可以轻松编辑Bash_profile文件。这不会在jelastic服务器上发生。 错误是,在bash_profile中声明环境变量时,我插入了错误的行。这些线产生了警告,如印刷品所示。我做了很多研究,无法弄清楚如何修复它。你能帮助我吗?
引起问题的行是: 导出backup_delete_schedule = 0 0 * * 1-5
。 用命令进入终端 echo“导出backup_delete_schedule = 0 0 * * 1-5”>> 〜/.bash_profile
In advance, I apologize for my English.
It was while researching how to solve the problem that I discovered Jelastic's recommendations for creating environment variables. Without this knowledge, I created variables like I create in linux, where in case of error, I can edit the bash_profile file easily. Which doesn't happen on Jelastic servers.
The error is that I inserted incorrect lines when declaring environment variables in the bash_profile. These lines generated warnings as shown in the print. I did a lot of research and couldn't figure out how to fix it. can you help me?
The line that caused the problem was:export BACKUP_DELETE_SCHEDULE=0 0 * * 1-5
.
Entered with command in terminalecho "export BACKUP_DELETE_SCHEDULE=0 0 * * 1-5" >> ~/.bash_profile
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1。出了什么问题?
被解释为类似的东西:
要将所有这些都放入变量中,您必须将其包装在引号上:
因此,将其附加到现有
〜/.bash_profile
文件将是这样的:2。如何修复它
在Jelastic节点上,此文件故意不可编辑(仅附加):
含义:
因此,您需要要么:
.bash_profile
从您的问题行删除问题行,显然,首选选项取决于您是否取决于您。是否需要该节点上的数据...
如何避免它
3。除了不犯错以后 (请参阅#1), jelastic文档描述了另一种方式 - 他们建议创建
〜/.bashrc
文件(如果有任何错误,您将拥有完整的编辑权限),该文件已在〜/.bash_profile
中自动source
。还请注意,使用
.bash_profile
的差异。.bashrc
:1. What went wrong?
Is interpreted as something like:
To put all of that into the variable you must wrap it in quotation marks:
So appending to the existing
~/.bash_profile
file would be like this:2. How to fix it
On Jelastic nodes, this file is deliberately not editable (only append-able):
Meaning:
Therefore you need to either:
.bash_profile
Obviously the preferred option depends if you need the data on this node or not...
3. How to avoid it in future
Besides not making the mistake (see #1), the Jelastic documentation describes another way - they suggest to create a
~/.bashrc
file (which you would have full permissions to edit, in case of any mistakes) which Jelastic already automaticallysource
within~/.bash_profile
.Please also note the differences regarding when
.bash_profile
is used vs..bashrc
: