summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
82cac6d)
tr often reports a broken pipe when the head command exits
(after having received enough characters) which pollutes the
test output.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
function randstring()
{
[ "$2" == "0" ] && CHAR="[:alnum:]" || CHAR="[:graph:]"
function randstring()
{
[ "$2" == "0" ] && CHAR="[:alnum:]" || CHAR="[:graph:]"
- cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-16}
+ cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-16} 2>/dev/null