Thursday, July 10, 2014

Pipe comand output to scp

If you want to pipe the shell command output to scp, eg. output of ls, you can use the following example:

scp $(ls -1 *.txt | head -1000) user@host:directory

No comments:

Post a Comment