Today see a help post ask this thing again, so boring wrote a.
With the awk script, which is that the script interpreter uses/usr/bin/awk instead of/bin/sh
But it's all a script, if you want to.
You can call me this awk script with a shell
Let command introduction:
Let command allows the bash shell to perform arithmetic operations, using lets to compare two operational values or perform operations such as subtraction, which are often used in the process control structure of the shell
Assemblies contain modules, and modules contain types, and types also contain members. Reflection provides an object that encapsulates assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type
First, conditional judgment statementMeet the criteria to execute the corresponding command[Condition]: more commonly used in scriptsCases:[-f/etc/hosts]Test condition: More commonly used for Linux character terminals1. File or directory judgment-F:
1. Conceptually"[[" is a keyword, and many shells (such as ash BSH) do not support this approach. Ksh, Bash (reportedly introduced support for [[support] from 2.02 onwards."[" is a command that is equivalent to test and is supported by most shells.
Parameter description1:$# indicates the number of arguments passed into the script2:$* indicates the execution of a script passed in the parameter list3:$$ represents the Process ID4:[email protected] means that the execution script passes all
How to read a file:First step: Pass the contents of the file to the while by pipe (|) or redirect (The second step is to call read in the while and read the contents of the file one line at a time and pay the value to the variable following read.
First, use in the shell if you need to enter some values, you need to use the READ-P commandThis is what I wrote. Guess the number game, at the beginning of the output, the screen will always print output "INT" after repeated practice to findDouble
Shell languageScript: Can run, a file, can implement some function (command stacking)[Email protected] ~]# vim/root/stu.shecho Hello WorldCat/etc/redhat-releaseUname-rHostnameIfconfig | Head-2[Email protected] ~]# chmod +x/root/stu.sh[Email
1, determine whether a number is in the one-way.#!/bin/Bashread-P"pls input a number:"N Case "$n" inch 1) Echo "variable is 1" ;; 2) Echo "variable is 2" ;; 3) Echo "variable is 3" ;; *) Echo "pls
Logical judgment in the shellFormat 1:if condition; Then statement; FiIf it's what it is, then what happens?Write a simple script that means when a=5, when a is greater than 3 o'clock print OK#!/bin/bashA=5If [$a-GT 3]ThenEcho OKFiExecute script
21.1 Why to learn shell programming(1) Linux OPS engineers need to write shell programs for server management when managing server clusters.(2) for Java EE and Python programmers, the need for work, your old assembly requires you to write some shell
awk IntroductionReport Generator, formatted text outputThe processing mechanism is similar to the SED command, which comes with loop processing, reads a line and then automatically reads the next line to processThe identity of the SED command
1. Practice command history, aliases, and special character usages in the shell (4th. 4.2, Section ~4.5)(1) Defining aliasesThe definition of an alias is that it is often enclosed in single quotation marks to prevent the shell from ambiguity about
all the process according to my experimentAnd I can accept the way to understand, we can refer to, if there is a problem, please leave a message.Sample Data[email protected] ~]$ cat
There are some differences between the interactive shell and shell scripts of Linux, mainly because of the existence of a separate running process, so there is a difference between the acquisition process PID.Interactive Bash Shell get process
Special symbols
* Any character
? Any one character
Comment characters
Indicates that the order does not take effect, and explains
\ de-Semantic characters
| Pipe breaks, several commands related
20.1 Shell IntroductionShell is a scripting languageYou can use logical judgments, loops, and other syntaxCustomizable functionsThe shell is a collection of system commandsShell scripts enable automated operations, which can greatly increase our
First, in Eclipse, the Java program is made into a runnable jar package1. Simply package the SRC directory and the third-party jar in the Lib directory 2. After selecting these two positions, "next", then "Finish", generate the Jar package3. Build
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service