Listing 30. Example of a case statement in bash.
清单30. bash中的case语句示例。
The instructions for each server type are wrapped in a case statement.
每一个服务器类型的说明都封装在一个case语句中。
If the values of that column are not a time stamp you will have to do a CASE statement.
如果该列不是一个时间戳,你将不得不做一个值情况语句。
A case statement within bash lets you test for more than one condition or value and act accordingly.
bash中的case语句可以用来测试多个条件或值并相应地执行操作。
Listing 1 shows an example of an SQL procedure with a case statement with a simple-case-statement-when-clause.
清单1展示了一个SQL过程的示例,包含一个case语句和一个simple - case - statement - when - clause。
A case statement allows you to quickly build upon it as your script evolves and needs to perform different tasks.
当您的脚本变得比较复杂、并且需要执行不同的任务时,可以使用case语句迅速地进行构建。
The getopts command returns true if an option is found, so a common option processing paradigm uses a while loop with a case statement as in this example.
如果找到一个选项,则getopts命令返回true,因此常见的选项处理范例使用带case语句的while 循环,本例中就是如此。
Consider the code above and realize that any enumerated value not specifically processed by a case statement is instead processed by the default statement.
研究以上代码可以看出,任何没有被case语句处理的枚举值都会被default语句处理。
To have just your public IP address returned and then use that IP address in a case statement in your scripts that need to change from one site to another.
返回公共ip地址,然后在需要修改的脚本中的case语句中使用这个IP地址。
For example, you can use it in combination with a case statement to choose the right aliases, as per the ps examples in the previous section, like Listing 10.
例如,可以按照前一部分中的ps示例,将该命令与case语句结合使用以选择正确的别名,如清单10所示。
Let's take advantage of that and set the discount while we are creating the table in the first place. The following use of a CASE statement will take care of that for us.
我们可利用这个优势,可在首次创建表时设置discount。
"For whatever reason, they were still hanging out on the Antarctic continent," Case said in a statement.
“无论是什么原因,它们确实一直在南极大陆上生活,”凯斯在一份声明中说。
A mealy-mouthed statement said the Crown Prosecution Service had asked for more information about the case and that the Met itself had taken more legal advice.
一份不直率的声明中说,皇家检察署问了关于这宗案件的详细信息,大都会它自己已采取符合本身的更多的法律意见。
This is the first time that the notion of authorization has popped up in this context, and it's an example of how writing a use case can find flaws in the problem statement.
这在上下文中是第一次出现认可(authorization)这一概念,并且它是编写用例如何能找出问题陈述中的缺陷的一个实例。
Jumping into a statement expression with goto or using a switch statement outside the statement expression with a case or default label inside the statement expression is not permitted.
不允许使用switch语句或是goto跳入到声明表达式中。
In this case, they can issue a SELECT statement to identify rows that qualify then DELETE those rows.
在这种情况下,他们可以发出一条select语句来识别符合条件的行,然后再DELETE那些行。
First I wrote a test case with an unguarded log statement.
首先用一条未监护的日志语句编写一个测试案例。
Unlike elapsed time, in case of a declare cursor statement the CPU time is the sum of open, all fetched and close.
与消耗时间不同,对于声明游标的语句,CPU时间是打开游标、所有读取操作和关闭游标的时间总和。
Holding the mouse pointer over a syntax error like this brings up a hover tip describing the problem; in this case, it indicates that it is an incomplete statement requiring a semicolon.
将鼠标指针放在出现语法错误(比如这里的语法错误)的地方,一会将出现一个描述问题的快捷提示;在本例中,它指出语句不完整,还需要一个分号。
Each use case is represented by an oval, and labeled with a declarative statement that describes what action the use case is intended to perform.
每个用例都由一个椭圆形代表,用描述这个用例将要执行什么样的行为的说明型陈述进行标注。
All from a statement of work, we can derive the feature list and use case diagrams, break up the problem, and then pick a use case to start to iterate.
所有内容都来自于工作说明,我们得到特性列表和用例图,分解问题,然后选择一个用例开始迭代。
Optimistic transaction locking should not be used to update sets of rows in a single update statement, as error handling in this case is very difficult.
乐观事务锁不能用于在单个update语句中更新数据行集合,因此在这种情况下,很难进行错误处理。
Listing 5 shows the customary XML declaration, followed by a DOCTYPE statement that locates the DTD, in this case pointing at detail related to grammars.
清单5中首先展示常规的XML声明,然后是一个定位DTD的doctype语句,在本例中是指向与文法相关的详细信息。
But that hasn't stopped Viking's environmental statement from stating that the risk of a slide, even in a worst-case scenario, is zero.
但这并没有改变维京公司在环境声明中表示,即使是在最坏的情况下,出现滑坡的风险都是为零。
In each XML file, you'll find a similar case-sensitive target statement that specifies where the content belongs in the navigation of a solution information project.
在每个XML文件中,都能发现一个类似的区分大小写的目标语句,这个语句指定了内容属于解决方案信息项目导航中的哪个位置。
In the case of the DB2 example in the left column of Table 3, if a particular SQL statement fails and generates an error, control is passed to the condition handler.
对于表3左侧列的DB 2示例,如果某条sql语句失败并生成一个错误,那么控制将被传递给条件处理程序。
"Her attending GP, through his quick response in activating the 993 ambulance for the patient, had also helped to minimise the spread of infection from this case, " said a ministry statement.
“病人的警惕,993救护服务在得知情况后的迅速出动,都使得传染的几率降至最低,”一个卫生部发言人说。
For each option, the case statement then attempts to identify the option, using either the short or long format and setting a variable.
对于每个选项,case语句会尝试识别该选项——使用短格式或长格式并设置一个变量。
Lastly, in line 18 an assertion statement is issued to determine the success or failure of a test case.
最后,在第十八行的断言语句中,决定了这个测试用例的成功与失败。
Lastly, in line 18 an assertion statement is issued to determine the success or failure of a test case.
最后,在第十八行的断言语句中,决定了这个测试用例的成功与失败。
应用推荐