To get this to work:
whiptail --msgbox "Text fitting takes trial & error." 7 38
...the user has to measure the text length, (33), add 5, (33+5=38), and
measure the lines, & add 6.
It'd be simpler if 'whiptail' calculated the 'height' and 'width'
automatically; for example:
whiptail --msgbox "Text fitting takes trial & error."
Shell script kludge for impatient users:
# one line of text only.
whipmsg() { whiptail --msgbox "$1" 7 $(( ${#1} + 5 )) ; }
whipmsg "hello world"
...but a better routine would allow for terminal width, and multi-line text..
The proposed syntax should also let users manually supply the 'height'
and 'width' options.
Similar defaults would be useful for most 'whiptail' options requiring
'height' and 'width'.
HTH...