Rework the command line arguments code to enable a more logical flow of required and non-required arguments.
改写命令行参数代码,以支持必需参数和非必需参数的更为合理的逻辑流。
The important thing is for you to get the return code of the command.
对于您来说,重要的是获得该命令的返回代码。
Now, look at the similar code that USES a command button, instead (Listing 2).
现在,再看看使用命令按钮的类似代码,更换为(列表2)。
And because every UNIX command returns a status code reflecting success or failure, you can use any command as a conditional — not just the test operators.
而且由于每个UNIX命令都返回一个指示成功或失败的状态代码,因此,您可以使用任何命令作为“条件”——而不仅仅是使用测试操作符。
As an example, let's take a look at the code for the refresh command (see Listing 1).
例如,让我们看一看用于刷新命令的代码(参见清单1)。
Figure 3 shows the output from running the API code from the command line.
图3展示了通过命令行运行API代码的输出结果。
Listing 3 shows what happens when you run the code on the command line with the PHP interpreter.
清单3显示了在命令行上用PHP解释器运行代码的效果。
Let's look at the JSP source code that USES a command link and compare it to the source code that USES a command button.
现在让我们来比较一下使用命令链接的JS p源代码和使用命令按钮的源代码。
Listing 1. Code for using a command link.
列表1.使用命令链接的代码。
Inside each script, capture the return code of each line command.
在每个脚本内,捕获每个行命令的返回码。
Like above, run this code with the following command line.
和前面一样,用下面的命令行运行该代码。
Run this code with the following command line
使用下面的命令行运行该代码
Add command method to page code.
向页代码中添加命令方法。
System properties can be set in code or on the command line as follows.
您可以在代码中或在命令行设置系统属性,如下所示。
When I run the script, this code appears on the command line.
运行脚本后,以下代码将显示在命令行中。
And when I run the code locally by using this command line.
当我使用以下命令行在本地运行代码时。
Then you use the conditional if statement to check the return code of the command.
然后,您使用条件型if语句,以检查该命令的返回代码。
Start the client code with this command from the DEMO_HOME directory (all on one line).
从DEMO_HOME目录使用以下命令启动客户机代码(全部在一行上)。
Here's what happens when I run this code on the command line.
下面是在命令行中运行此代码时出现的结果。
The following code shows how a Swing component command is implemented.
下面的代码展示Swing组件命令是如何实现的。
To compile and link the main code, use the following command line.
要编译并连接main代码,可以使用下面的命令行。
Listing 5 shows the command code for preset qmov.
清单5显示了预设置qmov的命令行代码。
The screencast shows how to paste snippets then use the generated git clone URL to access the pasted code using command line git and then pushing a modified version back.
录像中演示了如何粘帖代码片段,然后用git命令行通过Gist生成的git克隆URL访问粘帖的代码,最后把修改后的版本推送回去。
To do so, right-click on the tooling model and select Generate Tooling Code (this command will be in the bottom third of the context menu).
为了完成这项工作,右击工具模型并选择GenerateToolingCode(该命令将会位于背景菜单底下第三个位置)。
Deploy the code using the ant deploy command under the c: \ orderapp folder.
在c: \orderapp文件夹下使用antdeploy命令来部署代码。
This code runs the AIX date command.
这段代码运行了AIX 中的date命令。
CreateCommand - called by the command framework code to create a command provided by this provider.
createCommand——由命令框架代码调用,以创建此提供程序提供的命令。
CreateCommand - called by the command framework code to create a command provided by the provider.
createCommand——由命令框架代码调用,以创建提供程序提供的命令。
The variable "$?" provides the return code of the command recently invoked; in the example below, it provides the return code of the execution of the "ls" command.
变量 "$?"提供最近所调用命令的返回码;在下面的示例中,它提供了执行 "ls" 命令的返回码。
Of course, the next step is to build and install the code using the make command.
当然,下一步将使用make命令行构建和安装代码。
应用推荐