02-22-2010
Hi,
yes, I was aware that the error is in line 38 of the script... But I wanted to know why that was happening... Why the variable is getting a zero in it...
I just got the binaries and tried to execute it... I'll check if there's a newer version of it...
Thank you guys!!
Regards,
Rogelio M.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have file :
after i run this command :
there are error
can we print blank line if output error ??
thanks.. ^^ (4 Replies)
Discussion started by: justbow
4 Replies
2. Shell Programming and Scripting
How can I modify my awk code to get rid of the divion by zero error message? If I run the script without an input file, it should return error message "Input file missing" but not divison by zero.
Code:
#!/bin/nawk -f
BEGIN {
if (NR == 0)
{print "Input file... (4 Replies)
Discussion started by: Pauline mugisha
4 Replies
3. Shell Programming and Scripting
Hi Friends,
I am using the below code in my script:
elif
then
NEW_LINE=`echo $Line | awk '{sub ($4, "2010\\\/04\\\/07"); printf "# %s %9s %18s\n", $2,$3,$4}'`
sed $n" s/.*/$NEW_LINE/" kfile > tmp
mv tmp kfile
fi
Around 30 lines are replaced by this code... (2 Replies)
Discussion started by: sugan
2 Replies
4. UNIX for Advanced & Expert Users
I received error "awk: division by zero" while executing the following statement.
SunOS 5.10 Generic_142900-15 sun4us sparc FJSV,GPUZC-M
echo 8 | awk 'END {printf ("%d\n",NR/$1 + 0.5);}' file1.lst
awk: division by zero
Can someone provide solution?
Thanks
Please use code... (11 Replies)
Discussion started by: kumar77
11 Replies
5. Shell Programming and Scripting
input
0 0 9820373 2069 0 0 11485482
awk '{print ($1/$3) / ($4/$7)}' input
error
Is there any way to fix this problem ? (25 Replies)
Discussion started by: quincyjones
25 Replies
6. Shell Programming and Scripting
when i try the snippet in the console its working fine:
ps awwwux | grep php-fpm | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
output:
but when i try the bash script:
#!/bin/sh
# -*- sh -*-
#... (3 Replies)
Discussion started by: danieloooo
3 Replies
7. Shell Programming and Scripting
Hi Friends,
My input
chr1 100 200 1234E-02 0.01 0.05 10
chr1 100 200 14E-11 0.11 0.50 1
chr1 100 200 134E-22 0.00 0.65 111
My command
awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$13}' input | awk '{v=($5/$6); print $0"\t"v}' OFS="\t" | awk '{$8=(log($8)/log(2)); print $0}'... (4 Replies)
Discussion started by: jacobs.smith
4 Replies
8. Shell Programming and Scripting
Hello,
How can I add a logic to awk to tell it to print 0 when encountering a division by zero attempted? Below is the code. Everything in the code works fine except the piece that I want to calculate read/write IO size. I take the kbr / rs and kbw / ws. There are times when the iostat data... (5 Replies)
Discussion started by: tommyd
5 Replies
9. Shell Programming and Scripting
I want to implement the below formula with awk oneliner
new_value = ((old_value - old_min) / (old_max - old_min) ) * (new_max - new_min) + new_min
I want to pass the value of old_min and old_min as variable. Here is what I did for this
old_min=$(awk 'BEGIN{a=100000000000}{if ($10<0+a) a=$10}... (2 Replies)
Discussion started by: sammy777888
2 Replies
10. UNIX for Beginners Questions & Answers
Hello. I'm writing an awk script that looks at a .csv file and calculates the weighted grade based on the scores and categories in the file. I keep getting a fatal division by zero attempted error and I know what it means but I've been looking over the code for awhile and am not sure what is... (4 Replies)
Discussion started by: Eric7giants
4 Replies