【发布时间】:2017-03-05 11:51:57
【问题描述】:
它正在对我的 path_bash 变量做一些事情,但是什么?
Google 找到了this,但我找不到确切的位置。
#!/bin/bash
path_bash="$HOME/root/config/bash/"
source "${path_bash}_private.sh"
source "${path_bash}config.sh"
source "${path_bash}utility.sh"
source "${path_bash}workflow.sh"
source "${path_bash}net.sh"
source "${path_bash}makeHTM.sh"
我可以放吗
path_bash
在另一个文件中?
【问题讨论】:
-
顺便说一句,如果你有
source "$path_bash/_private.sh",那么你将不再需要花括号,因为紧接的下一个字符将是不能在变量名中使用的东西——并且您也对path_bash没有尾部斜杠的情况保持稳健。 -
顺便说一句,回复:谷歌给你的链接,TLDP 有很多谷歌的汁液,但他们的“高级”Bash 指南也以展示不良做法和很少更新而闻名。你最好使用the Wooledge BashGuide 或the bash-hackers wiki,当然还有the official documentation。
标签: bash