coreutils
[Top][All Lists]
Advanced

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

Numfmt tool – Applying space and comma to output's sizes


From: Ricky Tigg
Subject: Numfmt tool – Applying space and comma to output's sizes
Date: Thu, 22 Nov 2018 14:57:15 +0100

Component on Fedora: coreutils.x86_64 8.30-6.fc29

Hi. with a new purpose to observe a consign
<https://mywiki.wooledge.org/ParsingLs> which is to avoid parsing outputs
of function ls(1) and doubting the object of the present may be eligible
for an issue report I expose it first here.

I got a command ' numfmt --to=iec-i --
suffix=B --format "%.2f"'working as expected:

Model of current size output: 1,35KiB (<value><dot><value><unit>).
Model of size output I attempt to achieved: 1,35 KiB
(<value><comma><value><space><unit>).

$ for i in *; do printf "%s %s\n" $(stat -c %s "$i" | numfmt --to=iec-i --
suffix=B --format "%.2f") "$i"; done

Modifying it such as ' numfmt --to=iec-i --suffix=B --format " %,2f"' does
not work any more.

I attempt to apply it in that model of command:
$ for i in *; do printf "%s %s\n" $(stat -c %s "$i" | numfmt --to=iec-i
--suffix=B --format "%.2f") "$i"; done

Is there possibly any work-around related to numfmt? Any suggestion is
welcome. Regards R.T.


reply via email to

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