逃离bash的变量 [英] Escaping bash variable

查看:115
本文介绍了逃离bash的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点坚持了这一点。我在我的脚本的顶部delaring一个变量,然后我创建一个文件作为我的脚本的一部分:

I'm a bit stuck with this. I'm delaring a variable at the top of my script, then I am creating a file as part of my script:

app="testing"
cat <<EOF >/etc/init.d/test
#!/bin/bash
args="--emperor $APPCONF/test/$APP.ini"
EOF

它似乎没有工作,虽然,它似乎在$应用程序变量。我必须做一些事情来这个变量来得到它来显示它的价值,测试创建里面的文件?

It doesn't seem to work though, it seems on the $app variable. Must I do something to this variable to get it to display it's value, "testing" inside the file I create?

推荐答案

使用大小写一致。变量名是区分大小写的。

Use consistent case. variable names are case sensitive.

这篇关于逃离bash的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆