这是事实。虽然你总是可以重定向标准输出和标准错误输出,没有什么比命令行错误消息好。
That's true. Although you can always redirect stderr and stdout, nothing beats a good command line error message.
通过使用子外壳,可以对整个块(而不是单个命令)的标准和错误输出进行集体重定向。
Using the subshell, you can collectively redirect their standard and error output for the entire block instead of for each individual command.
如果希望将错误或标准输出组合为单个文件,请使用编号重定向(请参见清单4)。
If you want to combine error and standard output into a single file, use numbered redirection (see Listing 4).
如果输出流是标准输出,并且被重定向至一个文件,则选定的页将在该文件中。
If the output stream was stdout, and if it was redirected to a file, the selected pages will be in that file.
如果输出流是标准输出,并且没有被重定向至文件或管道,则选定的页将出现在屏幕上。
If the output stream was stdout, and if it was not redirected to a file or a pipe, the selected pages will appear on the screen.
与标准输出流一样,可以对stderr进行重定向或使用管道进行传输,但是您需要告诉Shell您希望处理stderr而不是stdout。
Like the standard output stream, stderr can be redirected or piped, but you need to tell the shell that you want to deal with stderr instead of stdout.
Shell重定向可以方便地将标准程序输出、程序错误消息或者这两者捕获到文本文件。
Shell redirection can be handy in capturing standard program output, error messages from a program, or both to text files.
因为您对标准输出和错误进行了重定向,所以您甚至可以为整个过程生成日志。
Because you redirected the standard output and error, you can even generate a log of the whole process.
还有一个名为ct的应用程序正运行于相同的目录,并且其标准输出(文件描述符1)重定向到一个名为output 的文件。
There is also an application named ct that is running out of the same directory and has its standard output (file descriptor 1) redirected to a file called output.
让我们考虑这样的情况,即需要将标准输出(stdout)重定向到一个日志。
Consider cases in which you need to redirect standard output (stdout) to a log.
代码生成器在标准输出上进行输出,所以我们将它重定向到目标trayicon . c。
The code generator outputs on standard output, so we redirect this into the target, trayicon.c.
为了把这个列表缩短到自己需要的范围,可以使用管道把ps—ef的标准输出重定向到grep,从而搜索自己真正希望看到的结果。
To shorten the list to what you're looking for, redirect the standard output of ps a "ef using a pipeline to grep to search for exactly what you want to see."
例如,在任何Shell中,您都可以使用tee命令来重定向文件和标准输出(请参见清单17)。
For example, within any shell, you can use the tee command to redirect a file and the standard output (see Listing 17).
再次运行这个程序,但是要将标准输出重定向到一个文件中,例如
Run the program again, but capture standard output to a file, for example
这是SSH的一个突出的优点,远程计算机重定向到相同的位置(标准输出、标准错误),所以您可以在本地进行重定向,同时保持输出结果的含义。
This highlights one of the benefits of ssh-the remote machine redirects to the same location (standard output, standard error), so you can redirect locally while retaining the meaning of the output.
输出被发送给标准输出,您可以随后将它重定向到文件。
The output is sent to standard output that can then be redirected to a file.
默认情况下,标准输入是从键盘处获取它的内容的,不过,就像标准输出那样,标准输入也是可以被重定向的。
By default, standard input gets its contents from the keyboard, but like standard output, it can be redirected.
该命令将把“input_file”的第 1页写至标准输出(也就是屏幕),因为这里没有重定向或管道。
This will write page 1 of "input_file" to stdout (the screen), since there is no redirection or piping.
实际上,您仍然可以对标准错误使用重定向或管道命令,但不能对标准输出使用,因为没有任何标准输出—正在内部使用popen函数由管道将它输送至lp进程。
Actually, you can still redirect or pipe stderr, but not stdout, since there will not be any standard output — it's being internally piped to the lp process using the popen function.
selpg的标准输出透明地被shell/内核重定向,成为“other_command”的标准输入,第 10页到第 20 页被写至该标准输入。
The stdout of selpg is transparently redirected by the shell/kernel to become the stdin of "other_command," to which pages 10 thru 20 are written.
在标准输出已被重定向至其它源,而您希望在同一命令行上将标准错误也写至同一目的地时,该特性就非常有用。
But this feature is useful when stdout has already been redirected to another source, on the same command line, and you want stderr to go to the same destination. For example.
同时,selpg进程在后台运行,并且标准输出和标准错误都被重定向至文件。
Meanwhile, the selpg process runs in the background, with stdout and stderr both redirected to files.
当cat的输出没有被重定向到一个文件或另一个命令的标准输出时,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.
bashshell允许重定向Linux或UNIX系统上的标准输入、标准输出和标准错误。
The bash shell lets you redirect standard input, standard output, and standard error on a Linux or UNIX system.
将JRuby的标准输出重定向到当前HTTP请求的输出流。
Redirects JRuby's standard output to the current HTTP request's output stream.
如果想要消除这些消息,可以重定向ij工具的标准输出和标准错误。
If you want to eliminate those, you can redirect the ij tool's standard output and standard error. For example, if you're working in the Bash shell, you can do this with.
该信息发送到标准输出,并可重定向到文件。
The information is sent to standard output and can be redirected to a file.
如果直接返回遇到重定向不输出内容的过程将失败,买方将被发送到我们的标准顺序处理页面。
If direct Return encounters a page that redirects without outputting content the process will fail and the buyer will be sent to our standard Order Processed page.
可以通过将标准输出重定向到文件以保存此列表。
You can save the list by redirecting standard output to a file.
为什么我的程序运行得更快,当我将标准输出重定向?
应用推荐