I’m trying to write an install shell script in /bin/sh in FreeBSD.
DialogOptions=’–trim –ok-label “Next” –backtitle “Workstation Installer”‘
dialog $DialogOptions –max-input 4 –cancel-label “Abort” –inputbox “Enter stuff”
The above exits with the error
Error: Unknown option Installer.
I think when I pass the DialogOptions variable to the dialog it interprets the quotation marks differently. I’m at a loss as to why it would.
I’ve also noticed that the ok label shows “Next” instead of Next.
To do what you want, you need to use an array, which will keep your quoted arguments un-split:
You also need to use a shell that supports arrays: bash/ksh/zsh. Failing that, you have to use
eval:Note that you don’t have to quote strings that don’t contain any characters in
$IFS