# If $1 is 'infinity', output forever or until the receiving pipe stops reading,
# whichever comes first.
generate_zero_bytes () {
- perl -e 'if ($ARGV[0] == "infinity") {
- while (-1) {
- print "\0"
- }
- } else {
- print "\0" x $ARGV[0]
- }' "$@"
+ test-tool genzeros "$@"
}
# In some bourne shell implementations, the "unset" builtin returns
port=$(($port + 10000))
fi
;;
- *[^0-9]*|0*)
+ *[!0-9]*|0*)
error >&7 "invalid port number: $port"
;;
*)