Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
bash.profile在查找匹配“时出现意外EOF”';_Bash - Fatal编程技术网

bash.profile在查找匹配“时出现意外EOF”';

bash.profile在查找匹配“时出现意外EOF”';,bash,Bash,当我打开这样的列表时,控制台有问题 我不能就此提出建议 -bash:/Users/name/.bash\u配置文件:第50行:在查找匹配的“%”时出现意外的EOF -bash:/Users/name/.bash\u概要文件:第51行:语法错误:文件意外结束 我的bash配置文件如下所示。请帮助我 # Add `~/bin` to the `$PATH` export PATH="$HOME/bin:$PATH"; export PATH="/Applications/MAMP/bin/php/p

当我打开这样的列表时,控制台有问题

我不能就此提出建议

-bash:/Users/name/.bash\u配置文件:第50行:在查找匹配的“%”时出现意外的EOF -bash:/Users/name/.bash\u概要文件:第51行:语法错误:文件意外结束

我的bash配置文件如下所示。请帮助我

# Add `~/bin` to the `$PATH`
export PATH="$HOME/bin:$PATH";
export PATH="/Applications/MAMP/bin/php/php7.0.0/bin:$PATH";
export PATH="~/.composer/vendor/bin:$PATH”

# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
    [ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;

# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob;

# Append to the Bash history file, rather than overwriting it
shopt -s histappend;

# Autocorrect typos in path names when using `cd`
shopt -s cdspell;

# Enable some Bash 4 features when possible:
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
# * Recursive globbing, e.g. `echo **/*.txt`
for option in autocd globstar; do
    shopt -s "$option" 2> /dev/null;
done;

# Add tab completion for many Bash commands
if which brew > /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
    source "$(brew --prefix)/share/bash-completion/bash_completion";
elif [ -f /etc/bash_completion ]; then
    source /etc/bash_completion;
fi;

# Enable tab completion for `g` by marking it as an alias for `git`
if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then
    complete -o default -o nospace -F _git g;
fi;

# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh;

# Add tab completion for `defaults read|write NSGlobalDomain`
# You could just use `-g` instead, but I like being explicit
complete -W "NSGlobalDomain" defaults;

# Add `killall` tab completion for common apps
complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall;
代码中的最后一个字符不是
,而是
。这让bash感到困惑


代码中的最后一个字符不是
,而是
。这会使bash感到困惑。

如果删除所有无关的引用,例如注释中的单引号和反勾号,会发生什么情况?似乎只是自找麻烦(是的,这不重要,但似乎是问题的最可能原因)。否则,请用行号重新发布您的代码。我们不想计数50行代码以查看问题在何处终止;-)祝您好运!(
)$(grep“^Host”~/.ssh/config | grep-v”[?*]“| cut-d”“-f2-| tr”“\n”“”…
看起来可疑。如果您将该行复制/粘贴到cmd行上会发生什么?祝您好运。您有一个在顶部第三个导出路径上的“智能引号”。至少在这个粘贴中是这样。这里是你的朋友。它捕捉到了这个错误和一些其他错误(如双引号中的
~
,不起作用)。此外,您不需要多次导出变量,而且几乎肯定已经为您导出了路径。如果删除所有无关的引用,例如注释中的单引号和反勾号,会发生什么情况?这似乎只是自找麻烦(是的,这不重要,但似乎是问题的最可能原因)。否则,请用行号重新发布代码。我们不希望必须数到50行代码才能看到问题在哪里终止;-)祝你好运!…“$(grep“^Host”~/.ssh/config | grep-v”[?*]“| cut-d”“-f2-| tr”“\n”)“…看起来可疑。如果将该行复制/粘贴到cmd行,会发生什么情况?祝你好运。在顶部的第三条导出路径上有一个“智能报价”。至少在这个糊里。他是你的朋友。它捕捉到了这一点和一些其他错误(比如双引号中的
~
不起作用)。此外,您不需要多次
导出变量,而且
路径几乎肯定已经为您导出了。我要说,它比
bash
更让读者困惑,它只是一直在构建一个字符串,因为它还没有遇到一个与第一个匹配的
”,很难“混淆”“一个计划,直到我们实现人工智能,无论如何,请原谅我的选择。”谢谢你们,你们太棒了。我想不出来,我的眼睛没注意到这个小错误。再次感谢:)我想说它比
bash
更让读者困惑,bash一直在构建字符串,因为它还没有遇到与第一个字符串匹配的
。很难“混淆”“一个计划,直到我们实现人工智能,无论如何,请原谅我的选择。”谢谢你们,你们太棒了。我想不出来,我的眼睛没注意到这个小错误。再次感谢:)
export PATH="~/.composer/vendor/bin:$PATH”