Shell脚本处理参数的方式与函数处理参数的方式相同。
Shell scripts handle parameters in the same way as functions.
您认为Struts的原设计者曾经想到过处理参数所需的代码有多少吗?
Do you think that the original designers of Struts ever dreamed how much code would be required to handle parameters?
getopt例程根据接受的选项字符的字符串来处理参数(必须传递给它argc和argv)。
The getopt routine processes the arguments (you must pass it argc and argv) according to a string of accepted option characters.
处理参数的代码的复杂性,以及它的广泛性和数量,意味着应该将它当做Struts中的一等公民。
The complexity of the code for handling parameters, as well as its pervasiveness and quantity, suggests that it should be treated as a first-class citizen within Struts.
通过本文,您将了解到如何在bash脚本中处理参数和选项,以及如何使用shell的参数扩展检查或修改参数。
In this tip you will learn how to handle parameters and options in your bash scripts and how to use the shell's parameter expansions to check or modify parameters.
清单12演示这个脚本的第二次迭代如何处理这些参数。
Listing 12 shows how the second iteration of this script processes these parameters.
清单3显示了处理HTTP参数的代码段。
Listing 3 shows the section of the code that processes the HTTP parameters.
某些引擎处理多种url参数,而其他引擎则不能。
Some engines handle multiple URL parameters, whereas others cannot.
它还有许多命令行实用程序、参数处理等示例。
It also has many examples of command-line utilities, argument processing, and so on.
在处理完这些参数以后,我们需要查找用户所请求的信息。
After we've processed the parameters, we need to find the information the user requested.
根(反)序列化器处理RPC参数和响应的序列化及反序列化的初始引导。
The initial bootstrapping of the serialization and deserialization of RPC parameters and responses is handled by the root (de)serializers.
有一些库可以用来帮助进行命令行参数处理。
There are several libraries available to help with command line argument processing.
在介绍其余要点之前,先来观察一下参数处理的实际示例。
Before we cover a few remaining points, let's look at a real world example of parameter handling.
这时,我已经得到了参数处理库的基本功能的规范说明书。
At this point I've got a basic functional specification for the argument processing library.
第一步是处理所有的参数,如清单5所示。
The first step is to process all the parameters, as shown in Listing 5.
我将预先找到所有的字段,然后只使用在参数处理期间已经被找到的信息。
I'll find all the fields in advance, then just use the information that's already been found during processing of the arguments.
BankAccountSPFile文件包含处理输入/输出参数和调用存储过程的逻辑。
The com.ibm.websphere.sample.BankAccountSPFile file contains the logic that handles the input/output parameter and invocation of the stored procedure.
例如,服务提供者将需要能够把它要发送响应的目标地址(例如答复地址)作为输入参数处理。
For example, the service provider will need to be able to handle as an input parameter the address to which it should send the response (for example, the reply-to address).
请求处理类读取hdchkDelete的参数值。
The request handling class reads the parameter values for hdchkDelete.
测试用例包含几个简单的命令参数处理,然后是一个循环,它计算指定值(如果有的话)的阶乘。
The test case consists of some simple command argument processing followed by a loop that calculates the factorial of the specified values (if any).
在编写脚本时,比较有难度的方面之一是处理命令行参数。
One of the more challenging aspects of writing scripts is handling command line parameters.
清单12给出了用来处理两个参数和根据这些需求清理部分路径的代码。
Listing 12 shows the code I used to handle the two parameters and cleanse the partial path according to these requirements.
这意味着该脚本必须将文件名作为一个参数来处理。
That means that the scripts have to handle file name as a parameter.
8版本的另一个局限性是无法处理有引用参数的CLR方法。
Another limitation of version 0.8 is the inability to deal with CLR methods which have reference parameters.
selpg首先处理所有的命令行参数。
(下载的源代码中的初始参数处理逻辑实际上更复杂,因为它还处理分离容器(Separate Containers)拓扑。)
The initial parameters processing logic in the downloaded source code is actually more complex, since it also handles the Separate Containers topology.
不要求顶级的性能,因为参数只需处理一次。
Doesn't require top performance, because the arguments are only processed once.
之后它包含待处理的下一个参数的索引。
Thereafter it contains the index of the next parameter to be processed.
函数参数与其他本地数据的处理稍有不同。
Function parameters are handled a little differently from other local data.
在本文中,我讲述了一个用于处理命令行参数的库的设计过程,作为反射的一个实际的例子。
In this article, I've run through the design of a library for processing command line arguments as an example of reflection in action.
应用推荐