The distinct interpretation of the $(),${} between make and shell

1)  In make $() = ${}

    To substitute a variable's value, write a dolar sign followed by the name of the variable in parentheses or braces:

    either '$(foo)' or '${foo}' is a valid reference to the variable foo

2) In shell: $() != ${}

     2.1)  The '$' character introduces parameter expansion,command substitution, or arithmetic expansion.The

             parameter name or symbol to be expanded may be enclosed in braces,which are optional but servo to

             protect the variable to be expanded from characters immediately following it which could be interpreted

             as part of the name

     2.2 ) Command substitution allows the output of a command to replace the command itself ,

            Command substitution occurs when a command is enclosed as follows:

            $(command)

            or

           `command`


阅读更多
个人分类: linux
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

The distinct interpretation of the $(),${} between make and shell

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭