Learn how to open all ebooks of one subject at same time
You'll learn:
- how to run async commands
- how to find and open several documents at same time
find . -iname "*python*.pdf" -exec xpdf {} \& \;
But, as you can verify it will open all the documents but only one at time. So here's the complete solution:
find . -iname "*python*.pdf" -print0 | xargs -0 -i bash -c "xpdf \"{}\" &"
If you're playing with xargs try use it with -p to see what it is doing.
You could be asking "Why not just something like
xpdf *.pdf
?". Well, there are viewers that doesn't support multiple file arguments. It only opens one file at time, like the kchmviewer:find . -iname "*python*.chm" -print0 | xargs -0 -i bash -c "kchmviewer \"{}\" &"
0 Comments:
Post a Comment
<< Home