0

This question already has an answer here:

I'm creating script that runs commands based on information from a checklist dialog:

dialog --checklist "Choose what you want to install:" 0 0 0  1 mysql on 2 java on  3 git off 2> tempfile

dialog box

I have the correct data in tempfile (1 2), but I don't know how to use this data in future in my script.

marked as duplicate by pLumo, Eric Carvalho, waltinator, Thomas, N0rbert Oct 21 '18 at 17:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • No, that question about inbox dialog, but I asked about chesklist dialog. Inbox returns one parameter, but i want to handle few parameters, which checked in checkbox – Valentyn Hruzytskyi Oct 19 '18 at 11:14
  • but the answer is the same.... – pLumo Oct 19 '18 at 13:13
2

You can use --output-fd 1 to send output to stdout and then capture it as normal.

answer=$(dialog --checklist "Choose what you want to install:" 0 0 0  1 mysql on 2 java on  3 git off --output-fd 1)

Not the answer you're looking for? Browse other questions tagged or ask your own question.