[uae] Re: Very ugly hdfcreator in bash

  • From: Markku Sukanen <daikane@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Thu, 30 Jun 2005 15:02:12 +0300

to, 2005-06-30 kello 12:52 +0200, Gingat Florent kirjoitti:
> Well heuu me again :p
> 
>  Elmar can you explain me a little this =
> 
> count=*`**echo* $2 "2048  * p q" *|* *dc* -*`
> 
>  I mean i've understand the echo $2 (2 come from the second input) but "2048 
> * p q" 
> 
>  I d'ont understand it's a multiplication but what * what :p ? 
> *

You're better off if you take the much simpler "integer math environ"
approach of bash, eg.:

   count=$(($2 * 2048))

All the stuff within $(( ... )) is treated as quite typical integer math
(no floating point math with bash itself).
---
Dai


Other related posts: