On 02/ 4/11 07:42 PM, Ethan Quach wrote:


On 02/03/11 23:24, Jan Damborsky wrote:

[...]



1147 - Would it be sufficient to use just '>' instead of '>|' ?
You didn't introduce that code, so I'll let you decide if you
want to change it or not.

After some searching around I found that '>|' means:


    Output redirection

*|> /filename/|*
    Standard ouput (file descriptor 1) is redirected to the named
    file. The file is overwritten unless the *|noclobber|* option is
    set. The file is created if it does not exist.

        The special device file *|/dev/null|* can be used to
        explicitly discard unwanted output. Reading from /dev/null
results in an End of File status.
*|>> /filename/|*
    Standard ouput is appended to the named file. The file is created
if it does not exist. *|>| /filename/|* Output redirect, and override the /noclobber/ option, if set.

And the 'noclobber' option:

*Definition: **noclobber*: If set, bash does not overwrite an existing file with the >, >&, and >> redirection operators. This variable may be overridden when creating output files by using the redirection operator >| instead of > (see also the -C option to the set builtin command).


Because we actually want to just overwrite that file regardless of the noclobber option, I'm going to leave it as is.


Agreed. Thank you for investigating this,
as I didn't know that '>|' works in that way.

Jan

_______________________________________________
caiman-discuss mailing list
caiman-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to