The distinct interpretation of the $(),${} between make and shell
2012-03-30 11:14
281 查看
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`
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`
相关文章推荐
- failed to sync branch You might need to open a shell and debug the state of this repo
- the difference between ClientID and ID of web control
- Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive
- failed to sync branch You might need to open a shell and debug the state of this repo
- Levels of integration between the Portal for ArcGIS and the ArcGIS Server
- The Diferences Between instruction,pseudo-instruction and directive of arm
- Project Manager - the Differences of the Role between Western Countries Company and Chinese Company
- failed to sync branch You might need to open a shell and debug the state of this repo
- Data migration to generate the maximum value of the sequence between beta scheme and appbeta scheme
- Bash/KSH/SH Shell: Find The Length Of a String On a UNIX, Linux, BSD, and OS X
- The balance between the number of specs and the rate of coverage
- failed to sync branch You might need to open a shell and debug the state of this repo
- My priliminary understanding of the relationship between virtual address and physical memory address
- [monitoring] how to create script to monitoring the status of orders and make graphs
- failed to sync branch You might need to open a shell and debug the state of this repo
- Difference between the Bill of distribution and sourcing rule.
- The Defining Decade-Why Your Twenties Matter--And How to Make the Most of Them Now
- The distinct between jdk and jre[转]
- The Hopes of Agnes Grey Contrasted with the Reality ---- Discussion on the Distance between Ideality and Reality
- failed to sync branch You might need to open a shell and debug the state of this repo