H with curly brackets
I saw at lodash.com this install snippet:
$ {sudo -H} npm i -g npm
Why are there curly brackets?
Where is the difference between:
$ sudo -H npm i -g npm
Thanks!
UPDATE: have a look at the comments of your question. it is not bash related.
an extract of the bash man page. hope this helps.
{ 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/97066.html
上一篇: Bash脚本if语句
下一篇: H大括号