Listing 1 provides a complete example by looking for the longest word in a particular file passed in from the command line as input.
清单1提供了一个完整的示例,该示例将在特定文件中查找从命令行作为输入而传入的最长单词。
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.
该输入可以来自作为最后一个命令行参数指定的文件,在没有给出文件名参数时也可以来自标准输入。
From a command prompt, invoke the batch file passing one of the sample XML files as input.
从命令提示调用批处理文件,将样例XML文件中的一个作为输入传递。
Because it finds at least one match to its two-character pattern on every line, the grep command outputs every line in the input file.
由于会在每行至少找到此双字符模式的一个匹配项,因此grep命令会输出输入文件中的每个行。
The cat (short for "concatenate") command takes one or more files on its input and prints them to its output as a single file.
cat (“concatenate”的缩写)命令在其输入上接受一个或多个文件并将它们作为一个单独的文件打印到它的输出。
The perl -n command runs the program once on every line of the input file.
perl -n命令针对输入文件的每一行运行一次程序。
You will also sometimes see a hyphen (-) used in place of a filename as an argument to a command, meaning the input should come from stdin rather than a file.
您有时会看到使用一个连字符(-)来代替文件名作为命令的参数,这意味着输入应当来自stdin而不是文件。
As shown in Listing 8, using the cat command without a file name simply echoes anything typed to standard input; the > redirection captures that to the specified file.
如 清单8 所示,使用不带文件名的cat命令只回显向标准输入键入的任何内容;>重定向将该输入捕获到指定的文件中。
This command has generated a new file -- hw.s -- that contains the assembler input text that you typically would not have seen, because the compiler defaults to producing the a.out file.
这个命令生成了一个新的文件hw.s,其中包含您通常无法看到的汇编输入文本,因为编译器在缺省情况下将生成a.out 文件。
The dvips command does not accept input from stdin, so the script may need to create a temporary file and copy stdin to that file before calling dvips.
dvips命令不接受来自stdin 的输入,所以这个脚本可能需要创建临时文件,在调用 dvips之前把 stdin拷贝到临时文件。
Make sure that the input file is removed from the FTP server (as shown in the command window below) and that the output file is created as configured in the message flow's FileOutput node.
确保从FTP服务器删除输入文件(如下面的命令窗口所示),并创建消息流的FileOut put节点中配置的输出文件。
The tee command functions as a T-pipe, taking its input (the output from the mainframe) and sending it to the next command as well as a file called tap.
tee命令的功能是作为t管道,将输入(主机的输出)发送到下一条命令和称为tap的文件。
This is because, again, sed only reads from the file you specify on the command line, using it as input — it doesn't try to modify the file.
这还是因为sed只读取在命令行指定的文件,将其用作输入——它不试图修改该文件。
Listing 4 shows a sample command you can use to call the Design Advisor and specify queries.sql as the input file that contains the SQL statements to analyze.
清单4显示了一个样例命令,您可以使用它调用Design Advisor和将queries .sql指定为包含需要分析的sql语句的输入文件。
Convert knows what image format the input and output are, based on the file extensions given on the command line. So, to convert a JPEG to a PNG, use a command line like the following.
convert根据命令行中给定的文件扩展名来了解输入和输出的图像格式分别是什么。
Each import can read a different section of the same input file because the import command allows you to specify "SKIPCOUNT m ROWCOUNT n" to read rows m+1 to m+n from the input file.
每个导入命令可以读取一个输入文件的不同片段,因为导入命令允许指定 “SKIPCOUNTmROWCOUNTn”来读取输入文件中的m+1到 m+n行。
If you do have a filter that requires input from stdin, you might think of using the cat command to copy the file to stdout, which would work.
如果您有要求来自stdin的输出的过滤器,那么可以考虑使用cat命令将文件复制到 stdout。
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编码。
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)。
To read back the information from the file, use the -i command-line option to specify the input source.
要从文件中读取这些信息,可以使用- i命令行选项,以指定输入源文件。
The latter will print the specified number of lines from the input stream made up of the files listed after the cat command, but treated as one single file.
后者将打印由cat命令后所列文件组成的输入流中指定行数的内容,但将把输入流作为单个文件对待。
When the output of cat is not redirected to a file or another command's standard input, cat behaves as most command-line tools and send its output to the console.
当cat的输出没有被重定向到一个文件或另一个命令的标准输出时,cat表现出来的行为与多数命令行工具一样,即将其输出发送到控制台。
For example, here's how you can accept command-line input in a groovy script. Create a new file named Hello.groovy and add the line in Listing 7.
例如,下面是在groovy脚本中接受命令行输入的方法。
No input file was specified, ignoring other command line parameters.
未指定输入文件,忽略其他命令行参数。
Specify a valid command or batch file, and any required input or output files.
指定一个有效的命令或批处理文件以及任何必需的输入或输出文件。
To specify an input file name, add the name to the command line as the input file.
若要指定一个输入文件名,请将该名称作为输入文件添加到命令行。
Reads the command input from a file, instead of reading input from the keyboard.
从文件中读取输入的命令,而不是从键盘输入。
Its name can be used in commands as input (for example, a LINK command file), or it can pass commands to the operating system.
它的文件名在命令中可以用作输入(例如,LINK命令文件),或者它可将命令传递到操作系统。
LINK accepts the command-file input as if it were specified in that location on the command line.
LINK接受命令文件输入,如同它是在命令行中的那个位置指定的一样。
LIB accepts the command-file input as if it were specified in that location on the command line.
LIB接受命令文件输入,如同它是在命令行中的那个位置指定的一样。
应用推荐