I want to learn to use the shell and was wondering why this didn't do as expected

Jeremy C. Reed plug-discuss@lists.plug.phoenix.az.us
Thu, 20 Feb 2003 12:28:42 -0800 (PST)


On Thu, 20 Feb 2003, Michael Havens wrote:

> Why did my version (sort mypasswd >mypasswd |cat mypasswd) erase it?


The shell deleted mypasswd (when you did ">mypasswd") before you tried to
sort it.

See Bill Jonas's email for good explanation.

   Jeremy C. Reed
   http://bsd.reedmedia.net/