You can use this process substitution syntax:
--textbox <(command) 600 800
Replace command
with your custom command.
Pergunta
The whiptail
command has an option --textbox
that has the following description:
--textbox <file> <height> <width>
The first option requires a file as input; I would like to use the output of a command in its place. It seems like this should be possible in bash - possibly with redirection? For the sake of the question, let's say I'd like to view the output of ls -l
in a whiptail textbox.
It looks like the marked answer does answer the question I asked, just not as regards to whiptail. For example, cat <(ls -l)
works. Hence I will mark the question as answered, even though the specific example of whiptail does not work with process substitution.
Solução
You can use this process substitution syntax:
--textbox <(command) 600 800
Replace command
with your custom command.
Outras dicas
Does this meet your needs?
ls -l > my_file
whiptail --textbox my_file