H大括号
我在lodash.com看到这个安装片段:
$ {sudo -H} npm i -g npm
为什么有大括号?
区别在哪里:
$ sudo -H npm i -g npm
谢谢!
更新:看看你的问题的意见。 它不是bash相关的。
bash手册页的摘录。 希望这可以帮助。
{list; }
list is simply executed in the current shell environment. list
must be terminated with a newline or semicolon. This is known
as a group command. The return status is the exit status of
list. Note that unlike the metacharacters ( and ), { and } are
reserved words and must occur where a reserved word is permitted
to be recognized. Since they do not cause a word break, they
must be separated from list by whitespace or another shell
metacharacter.
链接地址: http://www.djcxy.com/p/97065.html
下一篇: bash functions: enclosing the body in braces vs. parentheses