Filter scp output

Hello everyone! When I use command:


(scp -v -r username@ 'scp -r C:\Users\backup\Downloads*.pic root@


I get output:

*Authenticated to
*debug1: channel 0: new [client-session]
*debug1: Requesting no-more-sessions…
debug1: Entering interactive session.
debug1: pledge: network
*debug1: client_input_global_request: rtype hostkeys-00…y 0
*debug1: Sending command: scp -v -r -d -t /backups/pics/
*Sending file modes: C0666 10535574 file1.pic
*Sink: C0666 10535574 ASX file1.pic
*Sending file modes: C0666 1354013 file2.pic
*Sink: C0666 1354013 file2.pic


How can I get only strings with: Sending and Sink ?


Welcome to the forum. :wave:t4:

What have you tried so far?

This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

BTW: When you post code or sample data or console output please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance

1 Like