aboutsummaryrefslogtreecommitdiffstats
path: root/sshexec.1
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-07-26 16:13:57 +0200
committerMattias Andrée <maandree@kth.se>2024-07-26 16:15:26 +0200
commit4b99f670d7e35ac87340258fadba58b5dc1543d8 (patch)
tree8977170ed1e214352f9d749b74ab54483586fd81 /sshexec.1
parentEmpty signed commit (diff)
downloadsshexec-master.tar.gz
sshexec-master.tar.bz2
sshexec-master.tar.xz
Add support for redirecting file descriptorsHEAD1.1master
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'sshexec.1')
-rw-r--r--sshexec.190
1 files changed, 88 insertions, 2 deletions
diff --git a/sshexec.1 b/sshexec.1
index b734c5b..0dfe121 100644
--- a/sshexec.1
+++ b/sshexec.1
@@ -6,8 +6,9 @@ sshexec - run a command through ssh(1) with normal command syntax
.SH SYNOPSIS
.B sshexec
.RB [ {
-.RI [\fBssh= ssh-command ]
-.RI [\fBdir= directory ]
+.RI [\fBssh=\fP ssh-command ]
+.RI [\fBdir=\fP directory ]
+.RB [[\fIfd\fP]{ > , >> , >| , < , <> }[ & ] = \fIfile\fP]
.BR } ]
[ssh-option] ...\,
.I destination
@@ -97,6 +98,91 @@ In the remote, change working directory to
.I directory
before executing
.IR command .
+.TP
+.IB \fR[\fPfd\fP]\fP >= file
+After changing working directory (assuming one is specified),
+create or truncate the specified
+.I file
+and open it for writing, using file descriptor number
+.IR fd .
+(Default
+.I fd
+is 1 (standard output).)
+.TP
+.IB \fR[\fPfd\fP]\fP >>= file
+After changing working directory (assuming one is specified),
+create the specified
+.I file
+if it does not exist and open it for writing in
+append-mode, using file descriptor number
+.IR fd .
+(Default
+.I fd
+is 1 (standard output).)
+.TP
+.IB \fR[\fPfd\fP]\fP >|= file
+After changing working directory (assuming one is specified),
+create the specified
+.IR file ,
+but fail if it already exists, and open it for writing,
+using file descriptor number
+.IR fd .
+(Default
+.I fd
+is 1 (standard output).)
+.TP
+.IB \fR[\fPfd\fP]\fP <= file
+After changing working directory (assuming one is specified),
+open the specified
+.IR file ,
+for reading, using file descriptor number
+.IR fd .
+(Default
+.I fd
+is 0 (standard input).)
+.TP
+.IB \fR[\fPfd\fP]\fP <>= file
+After changing working directory (assuming one is specified),
+open the specified
+.IR file ,
+for reading and writing, creating it if it does not
+already exist, using file descriptor number
+.IR fd .
+(Default
+.I fd
+is 0 (standard input).)
+.TP
+.IB \fR[\fPfd\fP]\fP \fR{\fP>\fP,\fP>>\fP,\fP>|\fP}\fP&= file
+Duplicate the file descriptor
+.I fd
+giving the new file descriptor the number
+.IR file .
+(Default
+.I fd
+is 1 (standard output).)
+.TP
+.IB \fR[\fPfd\fP]\fP \fR{\fP>\fP,\fP>>\fP,\fP>|\fP}\fP&=-
+Close the file descriptor
+.IR fd .
+(Default
+.I fd
+is 1 (standard output).)
+.TP
+.IB \fR[\fPfd\fP]\fP \fR{\fP<\fP,\fP<>\fP}\fP&= file
+Duplicate the file descriptor
+.I fd
+giving the new file descriptor the number
+.IR file .
+(Default
+.I fd
+is 0 (standard input).)
+.TP
+.IB \fR[\fPfd\fP]\fP \fR{\fP<\fP,\fP<>\fP}\fP&=-
+Close the file descriptor
+.IR fd .
+(Default
+.I fd
+is 0 (standard input).)
.SH OPERANDS
The following operands are supported: