help-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: readrec.so bash printf


From: Jose E. Marchesi
Subject: Re: readrec.so bash printf
Date: Tue, 09 Jan 2024 18:57:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

> 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.

:)
Glad it sorted out.

>
> 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
>> 
>> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]