1. Event Description:
1 ,#! /Bin/bash
Cat ../ip.txt | while read line
Do
Echo $ line
SSH $ line "ls"
Done
The result is recycled once and then exited. The reason is that while uses the redirection mechanism. All the information in the file is read
While is the loop flow control, the standard format used iswhile (expression){Loop statement body;}
Description: The expression for the ①while loop is a cyclic condition, and the expression used as a loop condition generally includes at least one
/** Copyright (c) 2011, School of Computer Science, Yantai University * All Rights Reserved. * file name: test. CPP * Author: Fan Lulu * Completion Date: July 15, October 29, 2012 * version number: V1.0 ** input Description: none * Problem
An introductory Python statement that includes an if statement, a while statement, and a for statement for the Python beginner's reference.
If statement Example
name = ' Peirong ';
If name = = ' Peirong ':
print ' is Peirong ';
Elif name== '
In MySQL, the code test passes with a while statement loop that differs from SQL Server.
Method of using the while statement to generate data in MSSQL:
Sample code:
Copy Code code as follows:
DECLARE @a int
Set @a = 1
While @aBegin
There is also a while statement in F #. Next we're going to try to write code using the while statement.
In the article "invariance", some people commented that ref can be applied and we tried to use it.
The scope of the while loop is represented
Statement
Executes a block of statements for the first time, and then repeats the block of statements repeatedly until the conditional expression is equal to false.
dostatementwhile (expression) ;
Parameters
Statement
Options available. The
The while statement conditionally executes the inline statement 0 times or several times. The format of the statement is:
while (boolean-expression) embedded-statement
The order in which it is executed is:
(1) Computes the value of the Boolean
Python -- variable | basic data type | if, while statement, pythonwhileVariable name: it can only contain numbers, letters, and underscores and cannot start with a number. Variable names cannot be basic data types of keywords in python: number,
The next step is to learn the variables: replace complex strings with simple variablesthe first letter of the variable cannot be a number or a special symbol ~! @#¥ and so on. Development of character Sets:ASCII 255a1an
Consider the following scenario:#define FUNC (type, x, y)int a = 1;int B = 2if (a > B)Func (int, a, b);Else{type tmp = x; x = y; y = tmp;}std::coutIn this case, when Func is called, there is a semicolon at the end of the statement. After the
Python if else for while statement control [arrangement]Python if else statement if statement is used to check a condition: if the condition is true (true), we run a statement block (You are an if block); otherwise (else ), we execute another
iOS training------My C language notes, look forward to communicating with you! #include /*While (condition) {loop Body} operating principle 1. If the initial condition is not established, the loop body will never be executed 2. If the condition is
Suppose an amusement park or a different attraction will charge different fares depending on age:1. Free admission to children under 3 years of age;Children 2.3 to 12 years old need to buy a child ticket, 10 yuan per sheet;3. Children and adults
The example in this article describes the way to implement an infinite loop for the Go language simulation while statement. Share to everyone for your reference. The implementation methods are as follows:
This code uses the For statement as a while
Here is a typical decision to make if ... Else the general form of the structure is used in most programming languages:
If statement:
The If statement consists of a Boolean expression followed by one or more statements. Grammar:
Syntax for an IF
# While loop statement# If true:# Print ('hello ') # While true:# Print ('hello ')"""While If the condition is true, the content in the while statement block will be repeated.If the while loop condition is not true all the time, the endless loop"""#
This article details the variable basic data type if, while statement in Python
Variable name: can only consist of numbers, letters, underscores and cannot start with a number; variable names cannot be keywords inside python
Basic data type: Number,
In the ES6 new fast-scope concept (C language, as C-language JS, of course, should be added), is very good understanding.{let i;} Console.log (i); // i am not definedUse the new scope in the code block.The problem is that the FOR statementLet arr=
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.