I have this script
table="COLECTOR.COLECTOR.GPRS_SUM_REP"
tab_array=(${table//./ })
database="${tab_array[0]}"
schema="${tab_array[1]}"
tablename="${tab_array[2]}"
skew=$(/nz/support-IBM_Netezza-11.2.1.1-210825-0050/bin/nz_record_skew $table)
rskew=$(echo "$skew" | grep $tablename | awk 'BEGIN { FS="|" } { split($7,a,"-"); gsub(/ /, "", a[2]); print a[2] }')
echo "$skew"
echo $rskew
if [[ $rskew -gt 1 ]]; then
echo "is greater than 1";
else
echo "is less than 1";
fi;
I have this error
Database: COLECTOR (Sorted by Table Name)
Table | # DSlice's | Row Count | Min # Rows | Avg # Rows | Max # Rows | SKEW RATIO
---------------------------------+------------+----------------------+------------------+------------------+------------------+----------------
GPRS_SUM_REP | 576 | 56,023,104 | 95,901 | 97,262 | 98,491 | 0.986 - 1.013
1.013
ratio.sh: line 15: [[: 1.013: syntax error: invalid arithmetic operator (error token is ".013")
is less than 1
I am trying to compare 1.013 -gt 1 but got error
What can I do to make the comparison?