Re: Generating data depending upon the given size
- From: Janis Papanagnou <janis_papanagnou@xxxxxxxxxxx>
- Date: Wed, 11 Aug 2010 18:02:55 +0200
On 11/08/10 17:51, John Kelly wrote:
On Wed, 11 Aug 2010 15:46:35 +0000, John Kelly <jak@xxxxxxxxxxxx> wrote:
/dev/urandom is better than /dev/random for junk data. Or maybe even
/dev/zero piped to hexdump. You can use a format with hexdump to
eliminate spaces in the output. I did not see a way to do that with od.
Whoops. hexdump can read /dev/zero directly, no pipe needed:
hj:~# hexdump -n 4 -v -e '/1 "%.2x"' /dev/zero
00000000
Just change the "-n 4" to the number of bytes you want.
Okay. Then I'd use a shell builtin...
printf "%0*d", 78, 0
....will print 78 zeroes.
Janis
.
- Follow-Ups:
- Re: Generating data depending upon the given size
- From: John Kelly
- Re: Generating data depending upon the given size
- References:
- Generating data depending upon the given size
- From: srikanth
- Re: Generating data depending upon the given size
- From: pk
- Re: Generating data depending upon the given size
- From: srikanth
- Re: Generating data depending upon the given size
- From: Barry Margolin
- Re: Generating data depending upon the given size
- From: srikanth
- Re: Generating data depending upon the given size
- From: Janis Papanagnou
- Re: Generating data depending upon the given size
- From: John Kelly
- Re: Generating data depending upon the given size
- From: John Kelly
- Generating data depending upon the given size
- Prev by Date: Re: Generating data depending upon the given size
- Next by Date: Re: Generating data depending upon the given size
- Previous by thread: Re: Generating data depending upon the given size
- Next by thread: Re: Generating data depending upon the given size
- Index(es):
Relevant Pages
|