diff options
author | Jim Meyering <meyering@redhat.com> | 2008-05-14 17:20:42 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-05-14 17:20:42 +0200 |
commit | 49161ce7902821ef24a9e30b16dc87147c24da65 (patch) | |
tree | 9159f2a62b7e611d171140073c4141bdab93e57a /build-aux/mktempd | |
parent | 83332ed7cb60db2caee1883875eb24e9c41f505f (diff) | |
download | gnulib-49161ce7902821ef24a9e30b16dc87147c24da65.tar.gz |
use dd ifs=$n count=1 ... rather than less-portable head -c$n
* build-aux/mktempd (rand_bytes): head's -cN option is not accepted
by Solaris 10's /bin/head or by the one from HP-UX 11.x.
Reported in http://sourceforge.net/forum/message.php?msg_id=4960334
via Collin Lasse.
Diffstat (limited to 'build-aux/mktempd')
-rwxr-xr-x | build-aux/mktempd | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build-aux/mktempd b/build-aux/mktempd index 7ac914b31c..5bee3f0c76 100755 --- a/build-aux/mktempd +++ b/build-aux/mktempd @@ -44,7 +44,7 @@ rand_bytes() dev_rand=/dev/urandom if test -r "$dev_rand"; then # Note: 256-length($chars) == 194; 3 copies of $chars is 186 + 8 = 194. - head -c$n "$dev_rand" | tr -c $chars 01234567$chars$chars$chars + dd ibs=$n count=1 if="$dev_rand" | tr -c $chars 01234567$chars$chars$chars return fi |