aboutsummaryrefslogtreecommitdiff
path: root/man/man1/swr.1df
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-02 16:57:44 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-02 17:10:10 +1300
commit8904477c83d589db3e928a6c5a34d542b362de0b (patch)
treecf641232832feb5f67f630470bc8aa0623882507 /man/man1/swr.1df
parentHandle simple relative dirs in md() (diff)
downloaddotfiles-8904477c83d589db3e928a6c5a34d542b362de0b.tar.gz
dotfiles-8904477c83d589db3e928a6c5a34d542b362de0b.zip
Add swr(1df)
Diffstat (limited to 'man/man1/swr.1df')
-rw-r--r--man/man1/swr.1df37
1 files changed, 37 insertions, 0 deletions
diff --git a/man/man1/swr.1df b/man/man1/swr.1df
new file mode 100644
index 00000000..8792b0ed
--- /dev/null
+++ b/man/man1/swr.1df
@@ -0,0 +1,37 @@
+.TH SWR 1df "January 2017" "Manual page for swr"
+.SH NAME
+.B swr
+\- run a command including remote file arguments for scp(1) retrieval
+.SH SYNOPSIS
+.B swr
+cat remote:.ssh/authorized_keys
+.br
+.B swr
+diff .shrc remote:.shrc
+.SH DESCRIPTION
+.B swr
+runs the command given in its arguments, first replacing any arguments in the
+form HOST:PATH with copies of the specified files as retrieved with scp(1),
+copied into a temporary directory that should be removed on exit under most
+circumstances.
+.P
+This even works for the first argument (i.e. the command), provided that it
+will run on the local system once copied in.
+.SH CAVEATS
+This only works for simple commands; you can't put shell syntax into any of the
+arguments.
+.P
+The whole script will stop if even one of its arguments can't be copied in, as
+there's no way to tell whether it's safe to proceed without some of the data.
+.P
+Don't even think about using this for mission-critical cases or situations
+requiring high security. It's a convenience wrapper.
+.P
+You may not need this at all if your shell has working command substitution and
+you find its syntax clearer:
+.P
+ diff .shrc <(ssh remote 'cat .shrc')
+.SH SEE ALSO
+scp(1), mktd(1df)
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>