On Wed, 06 Oct 2021 18:29:42 +0100, The Natural Philosopher wrote:
On 06/10/2021 16:56, Andy Burns wrote:
zeneca wrote:
Hello
ennuient mais??
#/bin/bash
TOT=21765
let NUM=$TOT/1000
(( NUU=$TOT/1000))
echo "$TOT $NUM $NUU"
le resulta est 21
Ok mais j'aimerai 21.765 ou 21.7 Qq chose comme ça
Merci d'avance
TOT=21765
NUM=`echo $TOT / 1000 |bc -l`
echo "$TOT $NUM"
But don't be fooled, $NUM is a string, not a floating point number
In Javascript and many other languages, there is no difference.
Irrelevant. The topic of this conversation is Bash, not javascript
nor "many other languages".
Your digression seems meant only to confuse the issue under discussion.
--
Lew Pitcher
"In Skills, We Trust"
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)