1) Why is it called a shell?From the user's point of view, the user is not able to directly manipulate the kernel, but through the kernel "shell" program, known as the shell, to communicate with kernel.1 different operating systems use different
In Qt, you often invoke external commands or execute shell scripts, and you want to analyze the execution results.Qprocess runshellprocess =new qprocess (this); // Monitoring of invoking process outputs This , SLOT (Readprocess ())); Connect (
Which language is most helpful to you in your daily work? I think it's a non-shell. The earliest contact with the shell should be in college, such as the Linux file system cut will use some commands, such as Find, tar, Xargs, CP and so on, and put
Objective
How did grep get out?It's going to take us discovering, "g/re/p" see, that's it. "Global Regular expression print" ==> "globally finds the regular expression (RE) and prints the resulting row. ”The grep family consists of commands
#!/bin/bashcd= ' df-l |awk ' nr==3 {print $4} ' |awk ' BEGIN {fieldwidths= ' 2 1 "} ' {print '} 'If [$CD-ge 20];thenecho " hard disk space is full and cannot be backed up " | Mutt-s " backup alarm, please replace the hard drive in time " [Email
#!/bin/bashcd= ' df-l |awk ' nr==3 {print $4} ' |awk ' BEGIN {fieldwidths= ' 2 1 "} ' {print '} 'If [$CD-ge 20];thenecho " hard disk space is full and cannot be backed up " | Mutt-s " backup alarm, please replace the hard drive in time " [Email
Http://blog.sina.com.cn/s/blog_a56ef5490101cn58.htmlSed is a good file processing tool, itself is a pipe command, mainly in the behavior of the unit processing, you can replace the data rows, delete, add, select and other specific work, the
1. Integer comparison
-eq equals, such as:if [ "$a"-eq " $b"]
-ne not equal to, such as:if [ "$a"-ne " $b"]
-GT greater than, such as:if [ "$a"-gt " $b"]
-ge greater than equals, such as:if [ "$a"-ge " $b"]
-lt less than, such as:
1037774765 cloning1. Create a user redhat with an ID number of 1001, a basic group like (Group ID 2002), and rent it near Linux.Groupadd-g 2002 LikeGroupadd LinuxUseradd-u 1001-g 2002-g Linux Redhat2. Create a user fedora with the note information
For C in a B C D E F g;do echo $c; Done sequentially outputFor C in a B C D E F g;do tar czvf install.log. $c. tar.gz Install.log; DoneFor C in {a.. g}; do echo $c; Done the same as aboveSeq 1 10 columns of numbersFor i in {1..10}; do echo $i;
1:declare commandshell Default is String typeIf subtraction is required, it needs to be defined as an integral typeDECLARE command: Change the default variable type Decalre [+/-] [option] Variable name-set type properties for variables+ Cancel
The shell practice of Linux Learning
1. Describe the operation principle of shell program (can be attached with necessary graphic instructions);2, summarize all the knowledge points involved in shell programming (such as: variables, grammar,
In addition to ordinary characters in the shell, there are many characters with special meanings and functions.1. Wildcard characters* : string of any length? : Matches any single character[]: Matches any one of these characters, for example:[ABC]
When the shell executes a command, it returns a return value that is saved in the shell variable $? In When $? = = 0 o'clock, indicating successful execution; = = 1 o'clock, which indicates that the execution failed. www.2cto.com Sometimes the
Shell Introduction
The shell is a programming language interpreter, which interprets commands entered from the keyboard, and also explains the sequence of commands stored in the script, which is a file containing a series of commands, and
PS: Only consider the latest version of Scala and python2.x, due to the difference between python3.x and python2.x, and the mainstream of some open source projects are used Python2, currently python2 a little bit compatible python31.
Requirement Description: The string in the document is counted and sorted (from large to small), the test.txt content of the first 2 records is displayed as follows: A 12332a 2323a 234234b 232c 23432c 34 statistics and Sorting methods:
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