Sample Header Ad - 728x90

How to specify a number of copies in print lpr command using ssh

1 vote
1 answer
148 views
When I want to print a document using ssh from my local machine I use cat path/to/document.pdf | ssh my_name@server.com lpr This will print my document.pdf that is located in my local machine using a printer connected to server.com. If I want to print the document.pdf 5 times I do not know how to do it. I know with lpr I need to do lpr -#5 document.pdf but how to combine that with cat and ssh? I tried cat path/to/document.pdf | ssh my_name@server.com lpr -#5 and cat path/to/document.pdf -#5 | ssh my_name@server.com lpr but none of them worked.
Asked by zebda (13 rep)
Feb 20, 2024, 02:14 AM
Last activity: Feb 20, 2024, 04:00 PM