[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: readrec.so bash printf
From: |
Thomas Rupp |
Subject: |
Re: readrec.so bash printf |
Date: |
Tue, 09 Jan 2024 13:21:42 -0400 |
User-agent: |
Evolution 3.50.2 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Sometimes it's enough to talk about. I found my error. I was using the
same row definition to write the table header which is, of course, a
string.
Sorry for bothering you
On Tue, 2024-01-09 at 12:58 -0400, Thomas Rupp wrote:
> Hi all,
> i wrote a bashscript to select some data from a database. Two columns
> contains currency data with fieldtype real.
>
> The script works fine as long as i fprint the data as string,
>
> rows="%14s|%40s|%60s|%15s|%10s|%10s|%18s\n"
>
> but i like to have a numeric output with 2 digits after the point.
> But
> when i change the printf command to
>
> rows="%14s|%40s|%60s|%.2f|%10s|%10s|%18s\n"
>
> i get the error:
>
> line 12: printf: Rechnungsbetrag: invalid number
>
> Can somebody tell what i do wrong?
>
> Thanks
> Tom
>
>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEBQg8/xjIESkd/jtr2kvs0VROr6YFAmWdgKYACgkQ2kvs0VRO
r6Z+CBAAv5NHSUxV5knzYItwRNMxI+o1zTUPoFyix6fRG7WHXHMDlg2uoEiACZqa
JdanxNZG6zD0lsWcwKMZ/gfUow6VeB7Rx7N1MWepMsh/U+/3gmrDGt5hIM9ymYiH
1WHcK8mXcnHx3KhOxXrTlhDqBOROm5GLmKxzjKYXmyLMVqCjkA6NJ4Ioijmkhg6I
nP+Lf0AjgKoiI89UNDWLNIHNCsqbug6DidobE0uvzP7cFvu2STcMG/VC1y2gTnuC
cCQ9ksPQi955QAF4Iyk6xyzVMNgYp5Rr1wvJai0o9Yl26KeGIOBo09aw/YNYSg8s
frLIXek9lrx1C5YmIe4h89GrFCs8x9aLomtZ7W7/Ylo5yJcrZwplfyWB10gnoGAx
sjKPX7zOhQW1KvFaVucJbvJN63ttKTY07+8+isPSj5n2/4sCgqpFF+qeJNl7jatX
pz0swLeIxiPBESstfRuaQqn88twR4KHkWkWIR/SqrU9B+6TrryFZrpM0wpWda70k
xuV7yX7awtUBUg9I9Um0XBT3tywV4WizoHGL1qRTXM1s/hKUGn0QZLLKp/7NU9FD
FZOLDLwCHdCrQAhs4hrwXiEwOlyw5cjeQ3si8aNEPlPoJ1ZdGegYHNVXJED398K8
FqtdyKEy8sJA812ux2dmkFMmi/jEdqhv8wSvbI37ihYnHRyVR/4=
=t5ao
-----END PGP SIGNATURE-----