Skip to content

Instantly share code, notes, and snippets.

@siburu
Last active December 14, 2015 01:22
Show Gist options
  • Save siburu/fdfb426500da84cc73ed to your computer and use it in GitHub Desktop.
Save siburu/fdfb426500da84cc73ed to your computer and use it in GitHub Desktop.
Zsh's printf is more useful than that of Bash.
#!/bin/zsh
printf '%d\n' '12+34'
printf '%d\n' '1<<10'
printf '%d\n' '5^11'
printf '%d\n' '3**5'
printf '%f\n' '12.3+34.5'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment