#!/bin/bash

# The printf command is modeled after the stadard library function printf.
# It is expected to be compatible with POSIX.2.
# See man page for syntax.

printf "%s\n" hello
printf "%s\n" "hello, world"

# See what happens if you don't quote the format string.
printf %s\n hello

# Various numbers.
printf "%d\n" 10 -16 20
printf "%+d\n" 10 -16 20
printf "%.3f\n" 3.71598
printf "%x\n" 2 31 166 1024 
