(1) Write a script: If a path does not exist, it is created as a directory, otherwise it is present, and the content type is displayed#!/bin/bash#if [$#-lt 1]; Then echo "Plz Enter a path:" Exit 1fi if [-e $]; Then file $1else mkdir-p $1fi ~Test
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,
Miss the task Manager under Windows, ah, what to look at the pleasing of the program mouse points can be killed.Today in the Firefox browser to browse the Web page, the interface instantly stuck, nothing can point, test, only switch to command line
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]
1 , describes the operation principle of shell program (can be attached with necessary graphical description);What is a shell?The shell acts as the shell of the operating system, providing the user with an interface to use the operating system. It
Shell Introductionbash programming, then start with the programming, What is the program first? Personal words Explanation: program is the process of processing data. So, The program design consists of : program = data structure +
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
List The 10 shells you use mostHistory | awk ' {a[$2]++}end{for (i in a) {print a[i] "i}} ' | Sort-rn | HeadHistory | awk ' {a[$4]++}end{for (i in a) {print a[$i] " " i}} ' | sort-rn | headgrep-v "#". Bash_history |awk ' {++a[$1]}end{for
Read Catalogue
Numerical test
File test
String test
The test command in the shell is used to check if a condition is true, and it can be tested in three ways, such as numeric values, files, and characters.
-------------------------------------------------------------------------------------Regular expressions and wildcard characters:1. The regular expression is used to match the qualifying string in the file , and the Regex contains the match . grep,
1. Describe the operation principle of shell program (can be attached with necessary graphic instructions);
Span style= " font-size:12px;">shell is a special program that is officially defined as the interface to the kernel and is
Due to the limited time, I wrote this blog for a maximum of 30 minutes. Only as a study note, the content will be as clear as possible. If you don't know what to say, you can hit me!
Joke opened, formally began today's study.Some of the
Organize multiple sources from the network.1, source and Point command, the same function, the source is different.The source command is a built-in command of the Bash shell, which comes from C shell. Another notation for the source command is the
The Magical magic of awk:Extract the number 600 and note the special effect of the + sign.echo "Fuck 600ms" |awk ' {print + $NF} 'Result: Other characters are filtered, leaving only the number 600Using If,for in Commad mode#测试ifa=200if [$a = =];then
1. Download the Wordfile extension package from the UE official website: http://www.ultraedit.com/files/wf/wf.zip2. Open the UltraEdit and click on the menu "advanced"-"Configure" To open the Configuration dialog box. Click "Editor
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:
First, an array overviewArrays: Data StructuresData series, continuous multiple data, can be used to get related elements of the indexDeclaring an array:declare-e arraynameInitialization assignment:arrayname= ("STRING1" "STRING2" ... )Arrayname=
Encounter FTP to more than one machine problem, waiting for the last execution to execute the next, time will be longer, if you can simultaneously send files to multiple machines, you can achieve the purpose of saving time.Grammatical
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.