repo.or.cz
/
Samba
/
gebeck_regimport.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
lib/ccan: Fix format string errors found by -Werror=format in ccan failtest
[Samba/gebeck_regimport.git]
/
script
/
random-sleep.sh
blob
9bb866b3e09a2d5af3c06ce46eec03be614b575d
1
#!/bin/sh
2
#
3
4
if
[
$#
-lt
2
];
then
5
echo
"
$0
: <low> <high>"
6
exit
1
;
7
fi
8
9
l
=
$1
10
h
=
$2
11
12
s
=
$
(
expr
$h
-
$l
)
13
14
r
=
$
(
head
--bytes
=
2
/
dev
/
urandom |
od
-l
|
head
-n
1
|
sed
-e
's/^[^ ]* *//'
)
15
16
v
=
$
(
expr
$r
%
$s
)
17
d
=
$
(
expr
$l
+
$v
)
18
19
echo
"
$0
: sleep
$d
... start"
20
sleep
$d
21
echo
"
$0
: sleep
$d
... end"