numfmt


SYNOPSIS

       numfmt [OPTION]... [NUMBER]...

DESCRIPTION

       Reformat  NUMBER(s),  or  the  numbers  from standard input if none are
specified. Mandatory arguments to long options are mandatory for short options
too. --debug
print warnings about invalid input -d, --delimiter=X
use X instead of whitespace for field delimiter --field=N
replace the number in input field N (default is 1) --format=FORMAT
use printf style floating-point FORMAT; see FORMAT below for
details --from=UNIT
auto-scale input numbers to UNITs; default is 'none'; see UNIT
below --from-unit=N
specify the input unit size (instead of the default 1) --grouping
use locale-defined grouping of digits, e.g. 1,000,000 (which
means it has no effect in the C/POSIX locale) --header[=N]
print (without converting) the first N header lines; N defaults
to 1 if not specified --invalid=MODE
failure mode for invalid numbers: MODE can be: abort (default),
fail, warn, ignore --padding=N
pad the output to N characters; positive N will right-align;
negative N will left-align; padding is ignored if the output is
wider than N; the default is to automatically pad if a whites-
pace is found --round=METHOD
use METHOD for rounding when scaling; METHOD can be: up, down,
from-zero (default), towards-zero, nearest UNIT options:
none no auto-scaling is done; suffixes will trigger an error auto accept optional single/two letter suffix: 1K = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576, si accept optional single letter suffix: 1K = 1000, 1M = 1000000, ... iec accept optional single letter suffix: 1K = 1024, 1M = 1048576, ... iec-i accept optional two-letter suffix: 1Ki = 1024, 1Mi = 1048576, ... FORMAT must be suitable for printing one floating-point argument '%f'.
Optional quote (%'f) will enable --grouping (if supported by current
locale). Optional width value (%10f) will pad output. Optional nega-
tive width values (%-10f) will left-pad output. Exit status is 0 if all input numbers were successfully converted. By
default, numfmt will stop at the first conversion error with exit sta-
tus 2. With --invalid='fail' a warning is printed for each conversion
error and the exit status is 2. With --invalid='warn' each conversion
error is diagnosed, but the exit status is 0. With --invalid='ignore'
conversion errors are not diagnosed and the exit status is 0.

EXAMPLES

              $ numfmt --to=si 1000

              -> "1.0K"

              $ numfmt --to=iec 2048

              -> "2.0K"

              $ numfmt --to=iec-i 4096

              -> "4.0Ki"

              $ echo 1K | numfmt --from=si

              -> "1000"

              $ echo 1K | numfmt --from=iec

              -> "1024"

       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

linux numfmt 命令--转换数字的更多相关文章

  1. Linux Free命令各数字含义及Buffer和Cache的区别

    Linux Free命令各数字含义及Buffer和Cache的区别 Free 命令的各数字含义 命令演示 [root@vm1 ~]# free total used free shared buffe ...

  2. Linux Free命令每个数字的含义 和 cache 、buffer的区别

    Linux Free命令每个数字的含义 和 cache .buffer的区别 我们按照图中来一细细研读(数字编号和图对应)1,total:物理内存实际总量2,used:这块千万注意,这里可不是实际已经 ...

  3. linux tr命令实现windows文本格式与linux文本格式间的转换

    tr 命令 转换和删除字符 选项: -d --delete:删除字符 -s --squeeze-repeats:把连续重复的字符以一个字符表示,即去重 -c –C --complement:取字符集的 ...

  4. Linux查找命令:grep,awk,sed

    grep grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具 ...

  5. linux 常用命令大全

    linux 常用命令大全 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统 ...

  6. linux全部命令

    linux全部命令 一.安装和登陆命令1.进入图形界面startx 2.进入图形界面init 5 3.进入字符界面init 3 4.登陆login 5.关机poweroff-p 关闭机器的时候关闭电源 ...

  7. linux grep命令总结

    风生水起善战者,求之于势,不责于人,故能择人而任势. 博客园    首页    新随笔    联系    订阅    管理 posts - 791,  comments - 394,  trackba ...

  8. Linux find命令详解

    转自Linux find命令详解 一.find 命令格式 1.find命令的一般形式为: find pathname -options [-print -exec -ok ...] 2.find命令的 ...

  9. linux dd命令参数及用法详解---用指定大小的块拷贝一个文件(也可整盘备份)

    linux dd命令参数及用法详解---用指定大小的块拷贝一个文件 日期:2010-06-14 点击:3830 来源: 未知 分享至:            linux dd命令使用详解 dd 的主要 ...

随机推荐

  1. vs2012中使用Icenium开发应用

    Developing a Cross Platform Mobile App in Visual Studio using JavaScript & HTML5 http://www.dotn ...

  2. post请求报文

    POST /02_WEB_HTTP/index.html HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/ ...

  3. MapReduce实例-基于内容的推荐(一)

    环境: Hadoop1.x,CentOS6.5,三台虚拟机搭建的模拟分布式环境 数据:下载的amazon产品共同采购网络元数据(需FQ下载)http://snap.stanford.edu/data/ ...

  4. ArrayList vs LinkedList vs Vector

    List概览 List,正如它的名字,表明其是有顺序的.当讨论List的时候,最好拿它跟Set作比较,Set中的元素是无序且唯一:下面是一张类层次结构图,从这张图中,我们可以大致了解java集合类的整 ...

  5. 配置mysql远程访问权限,大家可能掉过的那些坑~

    1 作为互联网技术从业人 或者粗暴点说:作为一个程序猿.测试从业者 如果没掉过一些坑,都不好意思说自己混过技术圈     2 今天重点讲:mysql开启远程访问权限的那些坑- 对于mysql开启远程访 ...

  6. BIEE使用技巧

    索引: 1.如何清除缓存 2.通过“编辑 SQL”取得前一天的日期 3.格式化日历框参数 4.根据传入的开始时间和结束时间取得事实表中的指标(用到了3中的技巧) 5.直接调用数据库函数 6.时间格式转 ...

  7. redis k-v数据库、高速缓存、消息队列代理

    Redis 简介   Redis 是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库. Redis 与其他 key - value 缓存产品有以下三个特点: Redis支持数据的 ...

  8. SQL Server调优系列基础篇(常用运算符总结——三种物理连接方式剖析)

    前言 上一篇我们介绍了如何查看查询计划,本篇将介绍在我们查看的查询计划时的分析技巧,以及几种我们常用的运算符优化技巧,同样侧重基础知识的掌握. 通过本篇可以了解我们平常所写的T-SQL语句,在SQL ...

  9. 【转】单表60亿记录等大数据场景的MySQL优化和运维之道 | 高可用架构

    此文是根据杨尚刚在[QCON高可用架构群]中,针对MySQL在单表海量记录等场景下,业界广泛关注的MySQL问题的经验分享整理而成,转发请注明出处. 杨尚刚,美图公司数据库高级DBA,负责美图后端数据 ...

  10. 使用Windows Azure的VM安装和配置CDH搭建Hadoop集群

    本文主要内容是使用Windows Azure的VIRTUAL MACHINES和NETWORKS服务安装CDH (Cloudera Distribution Including Apache Hado ...