Hello All,
I am trying to do a simple calculation using modulus (%) as shown below. But some how it is not showing me correct result. It says "0.166667" is equal to "0" which is wrong. Could you please help me how can i make it work. Thanks a lot.
Wrong Result:
Expected output as per Oracle sql statement:
Hi,
I would like to know given that i have two columns and I would like to take the positive integer of the differences between the two columns.
which means |3-2|=1; |2-3|=1 as well.
I would like to know do Bash recognize | | as well for this purposes?
Thanks.
-Jason (2 Replies)
I need to read the file divide 3 column with 2nd and run a modulus of 10 and check whether the remainder is zero or not if not print the entire line.
cat filename | awk '{ if ($3 / $2 % 10 != 0) print $0}'
Whats wrong with it ? (4 Replies)