I want to scan a file from terminal. What is the command for that? I also want to print the same file on a different printer, thus making a copier. I want to put it together into a shell script. I know how to make a script, but I need the commands.
Edit 1: the scanner is usb and the printer is LAN and setup with CUPS.
Edit 2: I want the script to scan and print the document.
Scanning
More info
man scanimage
Printing
Connect your printer through usb, and do
lsusb
to find under what name it is reported to the system. For example I have Desjet_F4200.Next,
lp /path/to/your/file -d Deskjet_
and double-tap TAB button to complete the name. You can always turn this into a script instead of typing printer name every time:On my system I can use this address
Example:
Deskjet_F4200:net:192.168.1.2