logo

sshpaste

Simple paste script to a server having SSH+HTTP daemons
commit: 0e91e7601a0b13ef0197085781fbaec1e8c57890
parent: 64a8f5947cd475adbf5505d68b810fe50c500412
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun,  6 May 2018 20:38:41 +0200

sshpaste: Use cat <<EOF for easier output formatting

Diffstat:

MREADME5++++-
Msshpaste14+++++++++-----
2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/README b/README @@ -8,8 +8,11 @@ Please modify target_ssh and target_www to the appropriate servers and paths. ``` Usage: sshpaste [options] [file(s)] Options: - -x read input from clipboard (requires xclip) -c COMMAND paste COMMAND and the output of COMMAND + Can be used only once, not compatible with -x + -h show this help + -x read input from clipboard (requires xclip) + Can be used only once, not compatible with -c ``` ## Dependencies diff --git a/sshpaste b/sshpaste @@ -47,11 +47,15 @@ sshpaste_command() { } sshpaste_usage() { - echo "Usage: ${1} [options] [file(s)]" >&2 - echo 'Options:' >&2 - echo ' -c COMMAND paste COMMAND and the output of COMMAND' >&2 - echo ' -h show this help' >&2 - echo ' -x read input from clipboard (requires xclip)' >&2 + cat >&2 <<EOF +Usage: ${1} [options] [file(s)] +Options: + -c COMMAND paste COMMAND and the output of COMMAND + Can be used only once, not compatible with -x + -h show this help + -x read input from clipboard (requires xclip) + Can be used only once, not compatible with -c +EOF } flag_x=