0 Preface
The recent development process used a variety of scripting languages, found in these languages a lot of the $ symbol, and the $ symbol for each script language is not the same use and meaning, so borrow Bowen summary. Makefile scripts and shell scripts are often used in Linux application development, interestingly, there are significant differences in the use of $ notation between the two scripts, although in both scripts $ is associated with variables, but in makefile variables are wrapped in parentheses, and the shell script missing does not require parentheses.
1 shell Script
Defining variables
Copy Code code as follows:
Using variables, variable names do not need to use parentheses to wrap
Copy Code code as follows:
Example
Copy Code code as follows:
Url= "Http://www.jb51.net"
Curl-i $URL
2 Makefile
Defining variables
Copy Code code as follows:
Using variables, variable names need to be wrapped with parentheses
Copy Code code as follows:
Example--Define a constant macro in makefile
Copy Code code as follows:
DEFS =-dtest
Cflags + = $ (DEFS)
3 jquery
$ represents the shorthand for jquery,
Example--Print a string to the console after page load completes
Copy Code code as follows:
$ (document). Ready (function () {
Console.log ("Hello JQuery");
});
4 PHP
All variables in PHP begin with the $ symbol.