Use the printf command to format and display a complex structure. The first argument is a string expression of characters and conversion specifications using the same format specifiers as the printf C function. The printf command requires a running target program because it uses libc.
printf_command
: printf [ format_string [ , expression ,... ] ]
For example:
(idb) printf "The PC is 0x%x", $pc
The PC is 0x80532f6