the next line6) #被视为批注4. If you are executing with bash, you can choose Bash shell.sh or sh shell.shThe following example shows exactly what is in script:1) Since we are using bash, we have to declare the syntax of this file using bash syntax in #!/bin/bash2) All the other # are annotations3) need to declare major environment variables4) If the script name is sh01, then sh sh01.sh can execute his5. The most commonly used in C language is the choice of structure, here also, in script will also u
. version Information; 3. author and contact information; 4. file creation date; 5. history and so on. This will help rewrite and debug future programs!
Announcement of major environment variables:We recommend that you configure some important environment variables. laruence believes that path and Lang (if used to output related information) are the most important! In this way, we can directly issue some external commands when this program is running, without having to write an absolute path!
This article describes how to quickly learn how to load JavaScript scripts in WordPress and how to load CSS styles in response, for more information about how to load a script (CSS and JS, the same below) in WordPress, most people directly use the header. adding the link label to the php file or adding the link label directly to the head label through the wp_head Hook does not comply with official regulatio
does not return a value, and then call the function#!/bin/shtest(){ aNum=3 anotherNum=5 return $(($aNum+$anotherNum))}testresult=$?echo $resultDefines a function that has a return value, invokes the function, and outputs the result11#!/bin/shtest(){ echo $1 #接收第一个参数 echo $2 #接收第二个参数 echo $3 #接收第三个参数 echo $# #接收到参数的个数 echo $* #接收到的所有参数}test aa bb ccDefines a function that requires passing parameters12 redirectsresult > file #将结果写入文件,结果不会在控制台展示,而是在文件中,覆盖写$echo result >> file #将结果写入文件
that does not return a value, and then call the function#!/bin/shtest(){ aNum=3 anotherNum=5 return $(($aNum+$anotherNum))}testresult=$?echo $resultDefines a function that has a return value, invokes the function, and outputs the result11#!/bin/shtest(){ echo $1 #接收第一个参数 echo $2 #接收第二个参数 echo $3 #接收第三个参数 echo $# #接收到参数的个数 echo $* #接收到的所有参数}test aa bb ccDefines a function that requires passing parameters12 redirects$result > file #将结果写入文件,结果不会在控制台展示,而是在文件中,覆盖写$result >> file #将结果写入文
#!/bin/shsysout(){ echo "hello world"}sysoutDefine a function that does not return a value, and then call the function#!/bin/shtest(){ aNum=3 anotherNum=5 return $(($aNum+$anotherNum))}testresult=$?echo $resultDefines a function that has a return value, invokes the function, and outputs the result11#!/bin/shtest(){ echo $1 #接收第一个参数 echo $2 #接收第二个参数 echo $3 #接收第三个参数 echo $# #接收到参数的个数 echo $* #接收到的所有参数}test aa bb ccDefines a function that requires passing parameters12 redirects$echo
Easy to learn JavaScript 26: How to dynamically add JS scripts and CSS styles in DOM programming LearningThe following HTML document code is used:
div Region
1. dynamically load external JS files
Code for dynamically loading the external index. js file:
alert("I am JS file!");
Code for dynamically loading external JS files:
// Dynamically load the external JS file var flag = true; // set true and then lo
This article is in the study of "with the old boy learning Linux Koriyuki Shell Programming Practical" the knowledge points recorded in this book. I have benefited greatly from reading this book, but this is only my personal opinion. Now let's get to the bottom of the shell script.The shell itself is a command interpreter whose function is to interpret the commands and procedures for executing user input.The type of Shell scripting language: The main shell in SH, ksh, bash, csh, tcsh,linux is ba
, or the following command is run. 16. What if you just want to let a user use a variable? VIM/HOME/USERNAME/.BASHRC Add a row of export abc=123and then SOURCE/HOME/USERNAME/.BASHRC .17. Which command will be used to list all the variables in the system and the current user defined custom variables? SetExtended reading:"PS1" of Linux environment variablesHttp://www.lishiming.net/thread-5364-1-1.htmlLinux supports ChineseHttp://www.lishiming.net/thread-5360-1-1.htmlkeep command history permanentl
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.