Updating printf functions
Updating printf functions to print numbers and floats.
This commit is contained in:
parent
c353827bc4
commit
0655d01d62
6
bash.md
6
bash.md
|
@ -678,6 +678,12 @@ source "${0%/*}/../share/foo.sh"
|
||||||
```bash
|
```bash
|
||||||
printf "Hello %s, I'm %s" Sven Olga
|
printf "Hello %s, I'm %s" Sven Olga
|
||||||
#=> "Hello Sven, I'm Olga
|
#=> "Hello Sven, I'm Olga
|
||||||
|
|
||||||
|
printf "1 + 1 = %d" 2
|
||||||
|
#=> "1 + 1 = 2"
|
||||||
|
|
||||||
|
printf "This is how you print a float: %f" 2
|
||||||
|
#=> "This is how you print a float: 2.000000"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Directory of script
|
### Directory of script
|
||||||
|
|
Loading…
Reference in New Issue