One-Liner To Re-Create Text To A Remote Host

Occasionally, I desire to re-create a curt work of text to a remote computer. For instance, I bring an URL for to a greater extent than or less existent cool spider web site which, for whatsoever reason, I desire to mail to a remote host. I tin ever pose the text inward a file, together with transfer it via scp.

 $ truthful cat > coolurl.txt http://really-cool-web-site/  $ scp coolurl.txt peter@192.168.1.112: 

Or, yous tin role the next one-liner command:

 $ echo 'http://really-cool-web-site/'|ssh peter@192.168.1.112 'cat >coolurl.txt' 

The one-liner uses entirely uncomplicated commands such every bit echo, ssh together with cat. It saves yous the stride of creating a novel file on the local machine.

The text is saved to a file called coolurl.txt on the remote calculator nether your abode directory.

Let me know your favourite fashion to hand the same thing.

Berlangganan update artikel terbaru via email:

0 Response to "One-Liner To Re-Create Text To A Remote Host"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel