3 # Copyright (c) International Business Machines Corp., 2001
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13 # the GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this pronram; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 # PURPOSE: Creates dat for use in network file transfer tests.
24 # AUTHOR: Randy Hron (rwhron@earthlink.net)
26 ############################################################################
31 if [ -z "$1" ] ||
[ -z "$2" ] ; then
32 echo "usage: ${0##*/} <file> <size in bytes>"
36 [ -e "$file" ] && exit 0
38 if ! perl
-e "print 'A' x $size" > "$file" 2> /dev
/null
; then
39 if ! awk 'BEGIN { cnt='$size'; while (cnt--) printf "A" }' > "$file" 2> /dev
/null
; then
40 ( while ((size--
)) ; do echo -n A
; done ) > "$file"