Hi, I'm writing a shell script with Xdialog. I've read several guides and downloaded several scripts to see how to do it but I got no where.
What I'm trying to do is use a checklist to select various options in my script.
Code:
Xdialog --backtitle "$BGTITLE" \
--title "Remove user" \
--checkist "Please select the options you'd like to remove the user with" 0 0 2 \
"Remove" "Are you sure you want to remove this user?" off \
"Directory" "Remove users directory?" off 2>$TEMP
That is the code that I have at the moment. What I want to achieve is that if the Remove check is selected continue with the script removing the user specified earlier as $UNAME via a inputbox. Else it will show an error message. Also if the Directory check is selected, also remove the home directory of the user.
I've read several examples (such as the XDialog home page) how to do it but non of the examples help me implement --checklist in my script.
Any help would be much appreciated.
Thank you in advance