#!/bin/bash [ -z "$1" ] && echo "Please tell me where to place the files." && exit 1 [ ! -d "$1" ] && echo "I cannot see that directory." && exit 1 [ ! -w "$1" ] && echo "I cannot write to that directory." && exit 1 sizes=( 4K 48K 128K 256K 2048K ) name_prefix="data_slug" index="$1/slug_list.html" cat > $index < Files of random data

Files of random data

" >> $index ls -lSs $1/$name_prefix* #