0

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.

Zanna
  • 70,465

1 Answers1

3

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)
pLumo
  • 26,947