The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 dev/(u)random, mmencode
Author: k 
Date:   27-01-03 16:58

When I've generated passwords I usually use the following:
$ head -c 8 /dev/random|mmencode

However the output is always 12 characters, and I get 8 characters
when I use head -c 6

I've done this on other boxes and get the number of characters that
I pass through the head command.It acts the same in sh, ksh, and bash.

Does this happen for anyone else? Any ideas as to why?

Thx

Reply To This Message
 
 Re: dev/(u)random, mmencode
Author: Dan Langille 
Date:   27-01-03 22:49

$ head -c 8 /dev/random|mmencode | wc
1 1 13
$ head -c 8 /dev/random | wc
0 2 8

Seems to me that it's mmencode you should look at.

Reply To This Message
 
 Re: dev/(u)random, mmencode
Author: k 
Date:   28-01-03 04:08

Yeah, I couldn't quite remember the command I used but:

$ head /dev/random|mmencode|head -c 8

seems to work alright and the character amount comes out ok.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org