<<< Date Index >>>     <<< Thread Index >>>

Re: Changing Headers in the Compose screen



* On 2004.01.20, in <20040121041846.GG26679@xxxxxxx>,
*       "David Yitzchak Cohen" <lists+mutt_users@xxxxxxxxxxxxxx> wrote:
> 
> BTW - For a file less than 4096 bytes long, you can do this instead:
> cat < file | filter | cat > file
> as long as filter doesn't attempt to flush its output.  (The pipe buffers
> hold all the intermediate data.)
> 
> For files of arbitrary length, you can replace the UNIX pipe buffer with
> a small little program:
> filter <file | read_everything_into_memory_and_spit_back_everything_on_eof 
> >file

Kids, don't try this at home. This depends totally on the shell in
use, not on cat or r_e_i_m_a_s_b_e_o_e. Every shell I've tried this
sort of thing in implements pipelines in a certain unixy way: i.e.,
output streams must be opened before programs are executed, and the last
stage of a a pipeline executes before the first. (Pipelines execute
right-to-left.) This means that pretty much every shell is going to
overwrite your input file before anyone gets to read it. If anything
else happens, it's a scheduler fluke, and certainly not reliable.

-- 
 -D.    dgc@xxxxxxxxxxxx   **   Enterprise Network Servers and Such
                           **   University of Chicago
 We are the robots.        **   North America's southernmost seasonal glacier