Bash is a shell supported by major Linux distributions. When we landed bash, we didn't do anything, but we were able to invoke a variety of environment variables in bash. This is because a series of configuration files have been defined in the system and the rules for loading them. Below is an example of CentOS. Before that, we need to understand two concepts: th
Break is to jump out of the current loop, and continue is to jump out of the loop and start the new loop again[Email protected] test]#CatDemo.SH #/bin/Bash while true; DoRead-P"Please input number:"x yif((x>9)); ThenContinueelif((y>9)); Then BreakElseZ=$ ((x+y))Echo$zfi DoneEcho "Execution completed!"[email protected] test]#SHDemo.SHPlease input number:1 23Please input number:Ten 2 # $x >9, when the back part of the secondary loop is not executing,
Tags: meaning cond centos7 test cat size pre BER syntax errorNote: The comparison string in the shell can only be used = =, Compare numbers using-eq,-ne,-gt,-ge,-lt,-le, or = =, [[Email protected]SH]$CatNumber_compare.SH #!/bin/bash# script Name: Number_compare.SH#用途: Compare two digit sizesEcho "Please input first number :"Read xEcho "You first number x= $x"Read-P"Please input second number:"yEcho "You second number y= $y"if[$x-eq $y]; Then Echo
different UID requirements. call/etc/profile.d/*.sh settings 15. Terminal Environment Configuration stty,set16. wildcard characters and special symbols wildcard characters: * represents 0 to infinity any character ? represents an arbitrary character NBSP [] represents a character within brackets [-] represents a character within a bracket range [^] Non-bracket characters Special symbols: # comments nbsp escape | Pipelines ; C
purpose of simplifying the directory.
work= "/cluster/server/work/xxx/001/"
CD $work
When you want to enter the working directory, you can use the CD $work directly.
The function of the environment variable.
Use env to view environment variables and common environment variable descriptions.
Home: Represents the user's home folder.
Shell: Tell us which shell program the current environment is using. Linux uses/bin/
the configuration of the operating environment, which is generally divided into the configuration of the bash environment, the configuration of the terminal environment, and some commonly used symbols. It is necessary to note that the wildcard character in the symbol is a common thing.For the output operation of the command, there are two modes of operation, that is, the data flow orientation is to import or output the data, in which multiple command
]:~/learn$ cat Args.txt | Xargs SH cecho.sh;Arg1 arg2 arg3#Requirement 3, how do I embed parameters in a fixed command line? As shown below:Copy CodeThe code is as follows:[Email protected]:~/learn$ sh cecho.sh-p args1-1-P args1-1#[Email protected]:~/learn$ sh cecho.sh-p args2-1-P args2-1#[Email protected]sli-pc:~/learn
;!string: The most recent command in the command history that starts with a specified string!$: References the last parameter of the previous command;Esc.ALT +.Command completion, PATH completionCommand completion: Search the PATH environment variable specified by each of the paths with the string we give the beginning of the executable file, if the extra one, two times tab, you can give a list; otherwise it will be directly complete;Path completion: Search for each filename under the starting p
results of "mail.jpg tux.jpg".quotation marks (single and double quotation marks) prevent this wildcard extension:
#!/bin/shecho "*.jpg" Echo ' *.jpg '
This will print "*.jpg" two times.Single quotes are more restrictive. It prevents any variable expansion. Double quotes prevent wildcard expansion but allow variable expansion.
#!/bin/shecho $SHELLecho "$SHELL" Echo ' $SHELL '
The result of the operation is:
/bin/bash/bin/
other software.Many of the commands used on Linux systems, such as man, chmod, Chown, VI, are all standalone applications, but we can manipulate them through the shell (which is the command-line mode), allowing these applications to invoke the kernel to run the required work. As long as the interface that can manipulate the application becomes the shell. The narrow shell refers to the command-line aspect of the software, including bash and so on.The
big side.Listen to the old boy teacher and some experts said that the best way to learn early is to knock and break the problem of practice.The highest programming self-perception is:Problem analysis decomposition is fast and complete.Completeness: is to judge the various possibilities.High efficiency, high performance, 1+2+3...+100 = (1+100) * (100/2)/2Old boy Shell advanced programming combat Video 52 freeHttp://edu.51cto.com/course/course_id-963.h
Basics of Linux Shell scripting here we first talk about the shell of the basic syntax, the beginning, comments, variables and environment variables, to do a basic introduction, although not related to specific things, but lay the foundation is to learn easily after the premise.
1. Linux Scripting Basics
Basic Introduction to 1.1 grammar
1.1.1 Opening
The progra
Perhaps the content of this article is a bit dull, but I would like to say that if you want to learn more about how the game engine is dealing with animation breaks or footage and the player's manipulated characters to animate, then this is a good article (of course I just translated it)
animated script Animation Scripting
The Unity ' s animation system allows you to create a nice animated skinning charac
when locating a rect transform. first determine whether it has or should have any stretching behavior. Anchormin and anchormax attributes do not have the same tensile behavior.
For non-stretched rect transform, it is easiest to set this position by setting the anchoredposition and sizedelta attributes. The position of the anchoredposition specified by the anchoredposition and anchors. The same size of sizedelta is sometimes not stretched.
For stretched rect transform, it can be the location o
(18) unity4.6 learn Ugui Chinese Document ------- tips-Creating UI elements from scripting, ugui-creating
Hello everyone, I am Sun Guangdong. Reprinted please indicate the source: http://write.blog.csdn.net/postedit/38922399
More comprehensive content please see my game pretty cool address: http://www.unitymanual.com/forum.php? Mod = guide view = my4. CreatingUI elements from
Linux Scripting Learning
D: Delete rows that match the criteria
Sed ' 1,2d '/etc/fstab delete 1, 2 lines, show other rows
P: The line that displays the print fit condition
Sed '/^\//p '/etc/fstab matches the display, plus the original, there will be 2 duplicateSed-n '/^\//p/etc/fstab displays the line that matches the print
A: Add/string after the specified line
Sed '/^\//a \ #hello world '/etc/fstab \ #
Command aliasesAlias aliases = ' 'Aliases defined in the shell are valid only for the current shell life cycle, and the valid range of aliases is only the current shell processTo permanently use aliases in the shell, you need to change the configuration fileAlias displays all aliases that can now be used if no parameters are added laterCommand substitution$ (command), anti-quoteFile name wildcard globbing*: can match any character of any length? : can match any character (only one character)"":
Display and setting of variablesThe display of variables:echo $[variable name]To modify a variable name:Use the equals sign "="Variable names can only consist of alphanumeric characters and can only start with a letter.To cancel a variable:unset variable Nameenvironment variable function:Env view environment variables and descriptionsRandom number variablesSet view all variables (including environment variables)If you want to use your own defined environment variables in a child process, use the
Selenium and QTP are functional automated tests, LoadRunner and JMeter are automated tests of performance
Selenium requires a higher code capacity, suitable for PYTHON,QTP general use of Vbs,loadrunner General C, but now also can be used in Java and other languages.
Now the most powerful tool for functional automation is QTP, but the trend of selenium is growing, and it is recommended to use this tool
What's the difference between Selenuim,qtp,loadrunner,jmeter, where you want to
1, #!/bin/shThe first line tells the operating system that the interpreter for this script is/bin/sh this executable file2. While loop:#!/bin/shSleep 1; echo "User"; \Sleep 1; echo "Password"; \While true; Do \echo "Output"Sleep 1; \Done3, the shell script realizes the automatic input of Telnet, implements with the pipeline, the last while loop is used to give the last command full execution time(Sleep 1; echo "user"; \Sleep 1; echo "Password"; \Sleep 1; echo "Cd/usr/local"; \Sleep 1; echo "./te
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.