On Fri, 26 May 2000, Tom Rauschenbach wrote:

> WOW!  I've always assumed that the shell did all the plumbing up front (thereby
> clobbering the input to the second part of the "list", in this case named junk).
> 
> I've warned MANY people against clobbering their input by using the same file
> as ouput.  The sort(1) man page even goes out of its way to mention that the -o
> option won't clobber an input file if it is alsp the output.  
> 
> I think I won't depend having a modern shell anytime soon.

The -o option of the sort command is designed to get around the
stdout redirection in a case such as:

  sort file > file 

which WILL NOT WORK, even under modern shells.  In this case, you will
definitely wipe out your input file.  But if you do 

  cat file | sort > file

This will work just fine.  It's just not necessary and adds overhead. On
the other hand, with modern hardware the overhead is probably not worth
mentioning unless you've got a REALLY busy machine.  


-- 
Derek Martin
System Administrator
Mission Critical Linux
[EMAIL PROTECTED] 


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to