[Tfug] >> ?

earljviolet at deserthowler.com earljviolet at deserthowler.com
Thu Jan 27 16:07:58 MST 2011


Flash of light.  My problem was caused by my misunderstanding piping to a
file being piping to a program.

Earl

On Thu, January 27, 2011 3:17 pm, Zack Williams wrote:
> 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
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>


-- 
If you play a Windows install CD backwards it has satanic verses.
Save the Earth... it's the only planet with chocolate!!!!






More information about the tfug mailing list