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
Fazle Arefin 2024-03-04 00:47:08 +11:00 committed by GitHub
parent f114d5cd2e
commit a2ea10ad8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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}}`