Tags: case judge logical judgment file directory attribute in shell script determine if special usageI. Logical judgments in the shell
Format 1:if condition; Then statement; Fia=2if [ $a -ge 2 ];then echo ">=2";fi
Format 2:if condition; Then statement; else statement; Fia=1if [ $a -ge 2 ];then echo ">=2";else echo "
Format 3:if ...; Then ...; Elif ...; Then ...; else ...; Fia=6if [ $a -
Label:... Requirement write root must be judged by an echo capture variable conditionI. Logical judgments in shell scriptsIn the shell script, many will logically judge, judge a certain value, judge a file, or a directory, we do some action against the result of the judgment, if there is no judgment, there is no way to do some operationsFormat 1:if condition; then statement; fiExample:[[Email protected] ~]# if [$a-ge 3]//branch Write it like this
Repentance Inspirational Post Popular: No study no love no travel lead resonance
"Alas, soon graduated," the Spring March, the graduation season is coming, with all things to revive the growth of not only the senior students, but also regrets even regret. Recently, Hebei University of Science and Technology senior students Liu Nio in the school posted continuously, feeling that their work, although the feelings are available, but still feel "the pursuit of serious life", only because the univer
and execute.[Email protected] shell]# sh-x if3.sh
A=3
' [' 3-GT 4 '] '
' [' 3-gt 6 '] '
Echo NookNookAs can be seen, he carried out two logical judgments.
Logical judgment expression: if [$a-gt $b]; If [$a-lt 5]; If [$b-eq 10] etc.-GT (greater than >);-lt (less than -ge (greater than or equal to >=);-le (less than or equal to -eq (equals =);-ne (Not equal to! =)Note that there are spaces everywhere.If you want to use symbols
()'Foo ()Print foo. _ name __First, pay attention to the row 5th. If you comment out this line, foo. _ name _ will be 'wrapper '. In addition, I believe you have noticed that this decorator has a parameter. In fact, there are two other optional parameters. Attribute names in assigned are replaced by values, while attribute names in updated are merged by update, you can obtain the default values by viewing the source code of functools. For this decorator, it is equivalent to wrapper = functools.
MySQL-5.6.13 unzip version (zip version) Installation configuration tutorial [Download MySQL5.6.13] From MySQL official website mysql.com find MySQLCommunityServer5.6.13 for dev. mysql. comdownloadsmysql, here you can choose the operating system platform. Hong Ge chose Microsoft Windows. There are three
MySQL-5.6.13 unzip version (zip version) Installation configuration tutorial [Download MySQL 5.6.13] From MySQL official website mysql.com find MySQL
Set Set: is a set of unordered, non-repeatable collectionsCreation of 1.setse={"ww3", 23432,"name"}# Create an empty collection Se1=set ()2. Convert to a collectionli=[23,56,23,44]se=set (li)print(se)# output: {56, 44, 23} Common methods of 3.setAdd (self, *args, **kwargs): adds an element to the collection, and if the collection already has this element, it is not added for long# element not added in collection case se={23,54,11,788}se.addprint(se)# output: {one, 788, wu, wu, si} # a situation
Let $A =\{a_1$$\overline{\varepsilon} (A) =\limsup\limits_{n\to \infty}\frac{\log| a\cap\{1,2,\cdots,n\}|} {\log n}.$$We can similarly define the lower exponential density.We have the following result claimed in gaps and the exponent of convergence for an integer sequence.Main Result: $$\overline{\varepsilon} (a) =\tau (a) =\limsup\limits_{n\to \infty}\frac{\log n}{\log a_n}.$$Proof. Let $\overline{\varepsilon} (A) $$\limsup\limits_{n\to \infty}\frac{\log n}{\log a_n}\
First, the basic operating instructions:1, Equipment Recovery Factoryroot# Load Factory-defaultroot# Set System Root-authentication Plain-text-passwordroot# CommitRoot> Request System reboot2. Basic Configuration2.1 Configuring host namesroot# Set System Host-name SRX14002.2 Setting the time zone[Email protected]# Set System Time-zoneasia/shanghai2.3 Setting Time[Email protected]# run Set Date 201508011549.212.4 setting up DNS[Email protected]# Set System name-server202.l06.0.202.5 Setting the
【Program3]
Question: print out all the "Daffodils". The so-called "Daffodils" refers to a three-digit number.CubeAnd equals to the number itself. For example, 153 is a "Daffodils" because 153 = the power of 1 + the power of 5 + the power of 3. Program Analysis: first, the three-digit number 100-999. Second, you must calculate the number of each digit and the number equal to this number. The public int Ge (int n) can be obtained ); // obtain the numb
Write scripts so that the/ETC/RC.D/RC3.D directory has multiple files starting with K and starting with S, output in the following formatK The beginning of the back plus stops starts with the back plus startThe code is as follows:[[email protected] ~]# cat t1.sh#!/bin/bashfor file in $ (ls/etc/rc.d/rc3.d/);d OIF ["$ (echo $file |cut-c 1)" = = "S"];thenif [$ (echo $file |wc-c)-ge];thenecho-e "$file start" elif [$ (echo $file |wc-c)-
Decomposition time limit for the number:MS | Memory limit:65535 KB Difficulty:1
Describe
Your task is to find a minimum positive integer q so that the product of the Q's number of members equals N.
Input
Up to 450 sets of test data. The data ends with EOF.
Enter an integer N (0≤n≤400).
Output
Output Q, if Q does not exist then output −1.
Sample input
105
Sample
From: http://hehongqing168.blog.163.com/blog/static/19687667200962754425274/
1. If you enter a high level, and the output requires a low-power period, select the first line of the line.
2. If you enter a low-level device and the output requires a low-level device, select PNP first.
3. If you enter a low level, and the output requires a high-power period, select the first line of the line.
4. If you enter a high level and the output requires a high level, select PNP first.
High voltage, polar e
Thank you for your expectation. Finally, we were busy in September. It is your concern that has strengthened my determination to write down.
The next day, Ouyang Ming and their team came to the customer's bidding site early. However, they were told that they could not join due to quota restrictions. Only one speaker can go in. Because it was not the first speaker, Ma Ge, Kunming's manager, and Ouyang Ming both sat down outside.
Everyone is very nervou
Secondary Development of Google Earth has very weak functions and very little information.The following two links are provided:Googleearth API instructionsLink: http://www.tootc.cn/bbs/viewthread.php? Tid = 2602Abstract:Googleearth API keyhole 1.0 Type LibraryWhen you want to use the googleearth API, you must first reference it in the project. Take VB as an example and select "Reference" in the "project" menu ",If you have installed googleearth, "Keyhole 1.0 Type Library" is displayed in the ref
fact, there are two other optional parameters. Attribute names in assigned are replaced by values, while attribute names in updated are merged by update, you can obtain the default values by viewing the source code of functools. For this decorator, it is equivalent to wrapper = functools. wraps (func) (wrapper ).
2.3.2. total_ordering (cls ):
This decorator is useful in specific scenarios, but it is added after Python 2.7. It serves to add other comparison methods to the classes that implement
)
-Z String
True if string length is zero
[-Z "$myvar"]
-N String
True if string length is nonzero
[-N "$myvar"]
string1 = string2
True if string1 is the same as string2
["$myvar" = "One of the three"]
String1! = string2
True if string1 is different from string2
["$myvar"! = "one of the three"]
Arithmetic comparison operators
Num1-eq num2
Equals
[3-eq $mynum]
It's basically the same as last year Noip a problem.After the smallest spanning tree, it becomes the most weighted edge on the path that asks for a connection to two points.Multiply LCA, profile or whatever.Block trees are also very simple, but the point of each point to be recorded as a "connection with its parent node of the weight", and then do not use the LCA value of a violent LCA to update the answer.1#include 2#include 3#include 4#include 5 using namespacestd;6 #defineMAXN 150017 intRes,n
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.