[Tfug] >> ?

Zack Williams zdwzdw at gmail.com
Thu Jan 27 15:17:45 MST 2011


On Thu, Jan 27, 2011 at 3:06 PM,  <earljviolet at deserthowler.com> wrote:
> When I run pwgen from a terminal I get more than 100 passwords generated.
> I created an empty file to store the passwords in and used the command
>
> pwgen >> myfile.txt
>
> When I check the file I have only one password in it and not the 100+ the
> program must be generating.  Am I misunderstanding the use of >> or is
> something happening with pwgen I am missing?

pwgen probably figures out that you're redirecting it to a file, and
thus only generates the single password.

See also how ls can list files in multiple columns if sending to a
terminal session, but uses a single column if redirecting/piping to
another command.

- Zack




More information about the tfug mailing list