#! /bin/bash if [ $# -ne 3 ]; then echo "Usage: create_des_var_csv_file " exit 127 fi echo "Type,Name,Value,Enabled" > $3 number_of_design_variables_to_create_minus_1=`expr $2 - 1 | bc` for i in $(seq 0 ${number_of_design_variables_to_create_minus_1}); do if [[ $i -lt ${number_of_design_variables_to_create_minus_1} ]] then value_of_design_variable=`expr "scale=4; 0.50 + 0.1*(($RANDOM - 16384)/32767)" | bc` echo "variable,$1$i,${value_of_design_variable},enabled" >> $3; fi done echo "Done! Output filename is \"$3\"."