First, write some basic syntax:
1. String judgment
Str1 = str2
True when two strings have the same content and lengthStr1! = Str2True when str1 and str2 are different-N str1: true when the length of a string is greater than 0 (the string is not
// The question is very simple, that is, the area of the maximum triangle of N points .. Think of convex bag .. A look at the data, 1000000. If you use enumeration, it will certainly be TLE ..// It took two days to see the rotating jamming case .. I
I. Variable assignment
#! /Bin/bashA = "Hello World"#= No space is allowed on both sides!Echo"A is$"UnsetAEcho"This is $ {A} Nd"#It is best to use {} to expand the variable to avoid confusion.
Declare-I num1 = 10Declare-I num2 = 20Declare-I num3
First line #! Bin/sh
End with exit 0
Judgment:
I = "morning"
If test "& I"-EQ "morning"
Then ECHO "& I"
Elif test "& I"-EQ "Afternoon"
Then ECHO "$ I"
Else
Echo "night"
Fi
Echo "Please input yes or no"
Read I
Case ($
Passing parameters to triggers in Javascript using the shell packaging method
Reference address: http://callof.net/Site/pView.Asp? Id = 1270
In a well-structured web page, not only must the
CTRL + a switch to the command line
CTRL + e switch to the end of the command line
CTRL + l clear screen content
CTRL + u
ClearCut the content before the cursor
CTRL + k cut
ClearContent after the cursor
CTRL + y copy the content in the
1. Remove the file suffix ". Sh" from the current directory"
For I in 'ls .'
Do
MV-V $ I 'echo $ {I %. Sh }'
Done
2. When the column file directory is in the shell, the file name variable with spaces is not treated as two parameters.
Ls-
This book is comprehensive and detailed. It is suitable for beginners to study carefully.
Chapter 2 welcome to the Linux World
1. POSIX standard
2. Linux has kernel programming interfaces
3. Linux supports Secure hierarchical file
-B. returns true if the file exists and is a block file.-C: returns true if the file exists and is a character file.-D. If pathname exists and is a directory, true is returned.-E: returns true if the file or directory specified by pathname exists.-F
Compression command:*. Z compress program zookeeper case;*. Bz2 Bzip2 program zookeeper case;*. GZ gzip program upload history case;* The resources packaged by the. Tar program have not been deleted;* .Tar.gz tar program packaging example, which has
Originally published on Netease blog 20:17:39
Operating the database in Solaris shell is not very complicated. The whole process is the same as writing an FTP login shell.
The following is the shell I wrote after referring to the online materials:
1.
During the bug quality analysis, the word segmentation should be sorted and de-duplicated, so we thought of sort and uniq.
It is very convenient to call shell through python.
#-*-Coding: UTF-8 -*-Import OSImport sysDef cws_statistics (flag, afile,
This is my usual work desktop. Or this is the Emacs I usually work on.
To see the big picture, click here
The above figure shows a 4-window working mode that many people like very much. This mode is widely used by shell users. I once liked this
Bash brings command line editing, and countless people are blessed.
Yes. This is the case. The command line editing is really a good friend in our daily work. Can you still imagine how it feels to work in an ancient Bourne shell without command line
2.1 What is Shell
Interpreted language, which is not suitable for jobs that are picky about execution time or have a large processor.
Shell is a program that acts as an operation interface between users and Unix systems. File
In this article, through the summary of variable declaration, loop statements, condition judgment, and data superposition in shell scripts, most scripts of Linux daily management can be solved.
1. Variable declaration:
Is a weak language, with name =
1. Create and run Shell programs
What is a shell program? Simply put, a shell program is a file containing several lines of shell or Linux commands.
Like programming in advanced languages, writing a shell program requires a text editor, such as VI.
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