Fix bash scripts

This commit is contained in:
Fabio Scotto di Santolo
2020-08-22 10:15:09 +02:00
parent 4cc88d2f6e
commit 898c19b02b
5 changed files with 12977 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ typeset -i MB_SIZE=$1
typeset -i RN
typeset -i i=1
typeset -i X=0
WORKDIR=/scripts
WORKDIR=./scripts
OUTFILE=${WORKDIR}/largefile.random.txt
>$OUTFILE
THIS_SCRIPT=$(basename $0)
@@ -42,7 +42,7 @@ CHAR_FILE=${WORKDIR}/char_file.txt
# DEFINE FUNCTIONS HERE
##########################################
build_random_line ()
function build_random_line
{
# This function extracts random characters
# from the KEYS array by using the RANDOM
@@ -50,7 +50,7 @@ build_random_line ()
C=1
LINE=
until (( C > 79 ))
until [[ C > 79 ]]
do
LINE="${LINE}${KEYS[$(($RANDOM % X + 1))]}"
(( C = C + 1 ))