Skip to content

Commit b2bd93c

Browse files
authored
numfmt: add examples (#19809)
1 parent faace2a commit b2bd93c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pages/common/numfmt.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77

88
`numfmt --from si 1.5K`
99

10+
- Convert 1500 to 1.5K (SI Units):
11+
12+
`numfmt --to si 1500`
13+
14+
- Convert 1.5K (IEC Units) to 1536:
15+
16+
`numfmt --from iec 1.5K`
17+
18+
- Use appropriate conversion based on the suffix:
19+
20+
`numfmt --from auto {{1.5Ki}}`
21+
1022
- Convert 5th field (1-indexed) to IEC Units without converting header:
1123

1224
`ls -l | numfmt --header=1 --field 5 --to iec`

0 commit comments

Comments
 (0)