The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-07-2008
alby alby is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 3
Multiplication with Fractions

Hello there,
how do i multiply a fraction and a whole number? Example 20% of 50,000.
I had gotten 0.2 using the following:

chk=echo 20 100 | awk `{print $1/$2}`
echo $chk

$chk \* 50000 displays the error: non-numeric expression.