ABS sagt:
Bash does not understand floating point arithmetic. It treats numbers containing a decimal point as strings.
Use bc in scripts that that need floating point calculations or math library functions.
Kleines Beispiel:
$ echo 2.3+1.5 | bc -l
3.8
-l würde ich nicht weglassen, noch ein Beispiel:
$ echo 2.4 / 1.9 | bc
1
$ echo 2.4 / 1.9 | bc -l
1.26315789473684210526
"Erst nachdem wir alles verloren haben, haben wir die Freiheit, alles zu tun."
"It's only after we've lost everything, that we're free to do anything!"
Jabber: Die ID kann via PN erfragt werden.
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »maggu2810« (08.12.2005, 23:36)