Commands That Allow Output to be Piped or Redirected
Other chapters of this book cover many UNIX commands. In the discussion of a command, I may mention that output from this command may be piped or redirected. This is a mechanism that gives great flexibility and options. This section covers all that this implies so that you don’t have to read the explanation over and over.
Assume that cmd represents any command being discussed whose output may be piped or redirected. The following syntax will save the output in filename. Nothing will appear on the screen:
cmd > filename
Another option is to use the >> syntax to append the command output to the end of filename. It creates the file if it does not exist. Nothing appears on the screen because output ...
Get Practical UNIX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.