I am creating a menu to append or overwrite ssh keys for multiple users using dialog --checklist. The menu is something like this
0) append 1) user1 2) root
What I would like to happen is if option zero is selected and either option 1 or 2 or both are selected it would append rather than over writing the ssh keys when it regenerates.
I'm new to dialog and can't seem to come up with the logic needed to cause this to happen.
My first thought was to use the --separate-output option and somehow use grep on the results but there has to be a more elegant solution. Any help or advise is appreciated.