Extracting numeric value from output of a uder defined aggregate in netezza using bash script
- by Ankit
I am executing a shell script to execute my user defined aggregate which is taking inputs yavg=nzsql -c 'select avg(x) from Input1' which is giving output like this
AVG ---------- 2.000000 (1 row)
I want to pass only the numeric(double) value which is 2.0000(where xavg is expected) from this to S4(x,y,$xavg,$yavg) where x and y are the whole…