Question

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.

Update

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.

Était-ce utile?

La solution

You can use this process substitution syntax:

--textbox <(command) 600 800

Replace command with your custom command.

Autres conseils

Does this meet your needs? ls -l > my_file whiptail --textbox my_file

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top