How to list to a file?
Cameron Simpson
cs at zip.com.au
Tue Aug 7 03:23:23 UTC 2007
On 06Aug2007 09:24, Bob Goodwin <bobgoodwin at wildblue.net> wrote:
> I couldn't find that, looked in man bash but that covers a lot and I may
> have missed it?
I went "/>><enter>" to "man bash" and behold:
Redirecting Output
Redirection of output causes the file whose name results from the
expansion of word to be opened for writing on file descriptor n, or the
standard output (file descriptor 1) if n is not specified. If the file
does not exist it is created; if it does exist it is truncated to zero
size.
The general format for redirecting output is:
[n]>word
If the redirection operator is >, and the noclobber option to the set
builtin has been enabled, the redirection will fail if the file whose
name results from the expansion of word exists and is a regular file.
If the redirection operator is >|, or the redirection operator is > and
the noclobber option to the set builtin command is not enabled, the
redirection is attempted even if the file named by word exists.
Appending Redirected Output
Redirection of output in this fashion causes the file whose name
results from the expansion of word to be opened for appending on file
descriptor n, or the standard output (file descriptor 1) if n is not
specified. If the file does not exist it is created.
The general format for appending output is:
[n]>>word
Of course, I already knew the answer. But a search on "redirect" or
"append" would have been profitable to you. Never forget that the pager has
search functions - they're very useful.
Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
More information about the fedora-list
mailing list