Another way to get information from the user is through a command-line argument.
另一种从用户那里获得信息的方式是通过命令行参数。
Very simple -- $1 is the first command-line argument to the script, $2 is the second, etc.
很简单 -- $1是传给脚本的第一个命令行自变量,$2 是第二个,以此类推。
You can run the program from the command line with an XML filename as a command-line argument.
可以在命令行中运行该程序,输入以下XML文件名作为命令行参数。
Next let's build a slightly more complicated frame, using the -frame command-line argument.
接下来让我们用 -frame命令行参数构建一个更为复杂的边框。
To create a lowered border, just use the + raise command-line argument instead. For example.
只需要将命令行参数换为+raise就可以创建一个凹边。
In this case, you supply the name of the script file as a command-line argument to the ij tool.
在这种情况下,提供脚本文件名作为ij工具的命令行参数。
You can pass one of these files as a command-line argument to the test driver xml2json_test.php.
可以将这些文件作为命令行参数传递给测试驱动程序 xml2json_test.php。
For example, if the command-line argument were +helpverbose, str would be +helpverbose, and len would be 12.
例如,如果命令行参数为 +helpverbose,则 str 为 +helpverbose,len 为12。
I'd like the ebuild script to accept a second command-line argument, which will be "compile", "unpack", or "all".
我希望ebuild脚本再接受一个命令行自变量:“compile ”、“unpack ”或“all ”。
We simply added the --clear-datastore parameter as a command-line argument that gets passed into our start-up script.
我们只是添加了 --clear-datastore参数作为传递到启动脚本中的命令行实参。
Again, to use dialog or Zenity, replace code where you previously referenced a command-line argument with a dialog box.
再次说明,要使用dialog或zenity,用对话框替换您之前引用过命令行参数的代码。
By default, it runs until native memory is exhausted; to make it finish, pass a run time in seconds as a command-line argument.
默认情况下,它会一直运行直到本机内存耗尽;要让它停止,将运行时间(以秒为单位)作为命令行参数传递给它。
Moreover, it deliberately ignores any environment variable Settings for CLASSPATH or the command-line argument -cp that you supply.
而且,它还故意忽略针对CLASSPATH的全部环境变量设置,还忽略您提供的命令行参数-cp。
This case statement simply checks the second command-line argument, and performs the correct action, depending on its value. If we now type
这条 case 语句只是检查第二个命令行自变量,然后根据其值执行正确操作。
This usually resembles Listing 4 in code, which shows a simple XML parse, using a command-line argument as the filename of the XML document to parse.
这些代码通常与清单4类似,其中展示了一个简单的XML解析,使用命令行参数作为要解析的 XML文档的文件名。
Alternatively, you can configure a command-line argument for each node agent that will force a DNS cache refresh on a periodic basis. The property is.
此外,您可以为每个节点代理配置一个命令行参数,这将强制定期刷新dns缓存。
The code snippet shown in Listing 9 is the JSON-formatted result when you use test2.xml as the command-line argument to the test driver xml2json_test.php.
清单9中所示的代码片段是,使用test2 . xml作为测试驱动程序xml2json _ test . php的命令行参数时得到的json格式结果。
As discussed previously, if you don't give a command-line argument, the application will use the default feed sources input XML file (rss_feed_sources.xml).
我们在前面讲过,如果没有提供命令行参数,那么此应用程序将会使用默认的提要源输入xml文件(rss_feed_sources . xml)。
The program in Listing 3 shows how to do that in Python: the code takes a tar filename as a command-line argument and then prompts the user with several options.
清单3中的程序说明了如何在Python中完成这项工作:这段代码接受一个tar文件的名称作为命令行参数,然后向用户提供几种选择。
As of this writing, I can add just the nodes of a single XML document to an index database at a time, by specifying the document's name as a command-line argument.
在写作本文的时候,我只能通过将文档名作为命令行参数指定,每次将单个XML文档的那些节点添加到索引数据库中。
For collaboration, technical support, and similar USES, start your server with a command-line argument of -alwaysshared or similar, as its documentation specifies.
要进行协作、技术支持以及类似的应用,使用一个命令行参数-alwaysshared或类似方法来启动服务器,按照文档规范来执行。
However, you can get a feel for the quantity and quality of the data by using the -a command-line argument to SAR, which reports all the currently recorded information.
然而,通过使用SAR的-a命令行参数,您可以了解到数据的数量和质量,该选项报告了当前记录的所有信息。
The coding_name variable on line 330 is derived from a command-line argument specifying the encoding of the input file; if no such command line is provided, UTF-8 is used, instead.
第330行的coding_name变量源自于一个指定输入文件编码的命令行参数;如果没有提供这种命令行,就使用UTF - 8编码。
The output from this is huge, even on a lightly loaded system, so you typically either supply the name of a directory as a command-line argument or use a pipe to filter its output.
即使在负载很轻的系统上,这个命令的输出也非常长,因此通常通过命令行参数指定一个目录名,或者使用管道筛选它的输出。
To put the RSS feed aggregator to work, you have to use the following command syntax (note that the last token at the end of the command syntax below is an optional command-line argument)
要想让RSS提要聚合器开始工作,必须使用下面的命令语法(注意此命令语法末的最后一个标记是一个可选的命令行参数)
Get the request and policy files from the command line argument.
从命令行参数获得请求和策略文件。
There are several libraries available to help with command line argument processing.
有一些库可以用来帮助进行命令行参数处理。
This input can come either from a file specified as the last command line argument, or from standard input if no file name argument is given.
该输入可以来自作为最后一个命令行参数指定的文件,在没有给出文件名参数时也可以来自标准输入。
This month I'm going even further by looking at an application that seems to be a good match for reflection's strengths and weaknesses: a library for command line argument processing.
在本月这一期的文章中,我将通过查看一个应用程序来更深入地讨论这一问题,这个应用程序是用于命令行参数处理的一个库,它能够很好地体现反射的强项和弱点。
This month I'm going even further by looking at an application that seems to be a good match for reflection's strengths and weaknesses: a library for command line argument processing.
在本月这一期的文章中,我将通过查看一个应用程序来更深入地讨论这一问题,这个应用程序是用于命令行参数处理的一个库,它能够很好地体现反射的强项和弱点。
应用推荐