Trouble piping output of command into zathura

Henry Shackleton

The zathura man page states

zathura displays the given files. If a single hyphen-minus (-) is given as file name, the content will be read from standard input. If no files are given, an empty zathura instance launches.

Indeed, this works in bash if I run the command cat document.pdf | zathura -. However, I am unable to generalize this to other cases. Specifically, if I create a folder containing only document.pdf, running the command ls | zathura - returns an error, saying that zathura could not determine the file type. Why is this? Am I misunderstanding how piping works?

Quasímodo
cat document.pdf | zathura -

Pipes the content of document.pdf to Zathura, which tries to render it.

ls | zathura -

If you have only document.pdf directory and nothing else, that pipes the string document.pdf to Zathura, not its contents, so Zathura complains. Moreover, if you try to write a program and it involves parsing ls, you are most probably doing it wrong.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Piping output of command to sed

From Dev

piping output into middle of bash command

From Dev

Piping output of a command into grep and then into another command

From Dev

Trouble with piping

From Dev

Trouble capturing command output

From Java

Compress command output by piping to bzip2

From Dev

Problem IN piping the output of one command to other

From Dev

Redirect an output to a file from command piping grep

From Dev

Redirect an output to a file from command piping grep

From Dev

Problem IN piping the output of one command to other

From Dev

Piping Find and Move Command Output to a file

From Dev

Having trouble piping output of dscl -list to -dscl read using xargs

From Dev

Completely buffer command output before piping to another command?

From Dev

Piping output of a failed command in windows command prompt (cmd.exe)

From Dev

Python 3.4.3 subprocess.Popen get output of command without piping?

From Dev

Troubles piping echo output to xargs script for mv command

From Dev

Troubles piping echo output to xargs script for mv command

From Dev

How to bind a command to the # symbol in zathura

From Dev

having trouble with piping multiple times

From Dev

How to pass output to the xargs command by using piping and update user's plan after running the finger command

From Dev

Error piping before output

From Dev

Piping the output of comand columns

From Dev

piping output to an alias

From Dev

Error piping before output

From Dev

Sox - Piping output in windows

From Dev

Piping output to grep

From Dev

Piping systemd output into a file

From Dev

Piping output of puppeteer

From Dev

Piping result of command as an argument

Related Related

HotTag

Archive