mirror of https://github.com/CrimsonTome/tldr.git
printf: edit page (#12449)
* printf: edit page * Update pages/common/printf.md Co-authored-by: Muhammad Falak R Wani <falakreyaz@gmail.com> * printf: update example --------- Co-authored-by: Muhammad Falak R Wani <falakreyaz@gmail.com>pull/23/head
parent
f114d5cd2e
commit
a2ea10ad8b
|
@ -22,3 +22,7 @@
|
|||
- Store a formatted message in a variable (does not work on zsh):
|
||||
|
||||
`printf -v {{myvar}} {{"This is %s = %d\n" "a year" 2016}}`
|
||||
|
||||
- Print a hexadecimal, octal and scientific number:
|
||||
|
||||
`printf "{{hex=%x octal=%o scientific=%e}}" 0x{{FF}} 0{{377}} {{100000}}`
|
||||
|
|
Loading…
Reference in New Issue