The issue you're encountering is likely due to how dialog interacts with the terminal. By default, dialog clears the screen when it exits, which can make previous output (like echo test) disappear.
--clear or --no-clear OptionTo prevent dialog from clearing the screen, use the --no-clear option. This ensures that the output of echo test remains visible after the dialog menu closes.
bashecho test dialog --no-clear --menu "Choose an option" 10 30 2 1 "Option 1" 2 "Option 2"
--no-clear: Prevents dialog from clearing the screen when it exits.dialog may clear the terminal, causing echo test to disappear.--and-widgetIf you want to chain multiple dialog commands and preserve output, you can also use --and-widget to keep the terminal state intact.
Try it out and let me know if this resolves your issue!
Vibe can make mistakes. Check answers. Learn more