关闭

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

标签: shellcommandcharacterreferenceoutput
334人阅读 评论(0) 收藏 举报
分类:

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`


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:157984次
    • 积分:1920
    • 等级:
    • 排名:千里之外
    • 原创:45篇
    • 转载:43篇
    • 译文:0篇
    • 评论:8条
    文章分类
    最新评论