I need to send a file ( my_file.txt ) to an FTP Printer whose IP address is contained in another file ( printer_ip.txt ). This file contains only one IP address.
$ cat printer_ip.txt
10.111.22.333
What is the simple command I can use? Something like this?
$ scp my_file.txt | cat printer_ip.txt
I think what you want is
$ scp my_file.txt $(cat printer_ip.txt)