Use "%%" where you want% in the output text.
In the example above
let fn = 5 printf "%i%%" fn
will happily print "5%"
(Also, if you want to print "% 5" for some reason, the only way I found is to chain the lines, i.e.
"%"+ (printf "%i" 5)
because
printf "%%%i" 5
won't work either.)
source share