문제

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.

도움이 되었습니까?

해결책

You can use this process substitution syntax:

--textbox <(command) 600 800

Replace command with your custom command.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top