Does dialog box works on all kind of shells? I am using korn shell in Linux .
For me dialog is not working is there any particular syntax or do we need to have particular OS version or shell env?
#!/bin/ksh
dialog --title "create file" \
--backtitle "shell script practice" \
--yesno "Are you sure you want to create \"/tmp/test.txt\"?" 7 60
# Get exit status
# 0 means user hit [yes] button.
# 1 means user hit [no] button.
# 255 means user hit [Esc] key.
response=$?
case $response in
0) echo "File created.";;
1) echo "File not reated.";;
255) echo "[ESC] key pressed.";;
esac