Shell Script Job

(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

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,

Linux shell script implementation kills processes based on process name

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

Shell Time Statistics Script

#!/bin/Sh#today= ' Date +%y%m%d ' year= ' echo $ '1|cut-c1-4' MONTH= ' echo $ '1|cut-c5-6' Day= ' echo $ '1|cut-c7-8' time= $YEAR-$MONTH-$DAY #echo ' Date-D"$TIME-2 Day"+%y-%m-%d ' URL="/home/work/webdata/logs/focusapi_access_log.$1"#昨天的日期 #yes_dt= '

Special characters in the shell

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]

Linux System Shell Brief

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 Script Foundation Advanced (i)----shell introduction

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 detailed introduction and programming (ON)

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

Operations Common Shell

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

Shell's "test" command

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.

[Shell] Regular expressions and wildcard 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,

September 13, 2015 Course assignments-Questions about the shell

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

Common Linux Commands Explanation (fifth day)--shell variable learning

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

About the Shell's source, point (.), and Export

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

Linux Shell learning comes in mind

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

UltraEdit Configuring shell script highlighting

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

Use the shell to count the number of occurrences of a string and sort the display from large to small

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:

Shell Foundation V: Array Preliminary

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=

Shell concurrently executes multithreading

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

[Algorithm] Shell sort

Public voidSortint[] list) { intGap = LIST.LENGTH/2; while(1 Gap) { for(inti = gap; i ) { intj = 0; inttemp =List[i]; for(j = i-gap; J >= 0 && temp Gap) {List[j+ Gap] =List[j]; } list[j+ Gap] =temp; } Gap= GAP/2; }}Shell sort,

Total Pages: 541 1 .... 376 377 378 379 380 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.