not that what i’m about to tell you is brilliant, new or revolutionary, however i thought i’d mention it in case you’re not doing it. also feel free to let me know if there is a better way.
problem: i have some stdout which comes from a command and i want it in a file on another machine.
i could first send it to a temp file, scp that over, and then remove the temp file; but instead, i’ll just:
echo here is some stdout | ssh example.com tee filename
which gives me the added bonus of seeing the contents fly by my screen as they get sent through tee.
You can follow James on Mastodon for more frequent updates and other random thoughts.
You can follow James on Twitter for more frequent updates and other random thoughts.
You can support James on GitHub if you'd like to help sustain this kind of content.
You can support James on Patreon if you'd like to help sustain this kind of content.
Your comment has been submitted and will be published if it gets approved.
Click here to see the patch you generated.
Comments
Nothing yet.
Post a comment