On Feb 20, 1:25pm, Michael Havens wrote: > Why did my version (sort mypasswd >mypasswd |cat mypasswd) erase it? Because the redirection operator opens and truncates the file. This is done by the shell before the sort program even gets a chance to do its own open() of the file. Kevin