From 65c934a85e44f2afe9dd6a2c6f9190c1fdb6f6aa Mon Sep 17 00:00:00 2001 From: Francesco Minnocci Date: Wed, 18 Jan 2023 16:15:59 +0100 Subject: [PATCH] fix: FIXED SPACES by escaping --- printa4 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/printa4 b/printa4 index 00cc2a6..3cade6b 100755 --- a/printa4 +++ b/printa4 @@ -21,16 +21,16 @@ _server="login" main() { if $NO_CLI; then for f in "$@"; do - scp "$f" ${_user}@${_server}.dm.unipi.it:${_home}/${_user}/printa4-"$(basename "$f")" - ssh -XY ${_user}@${_server}.dm.unipi.it okular ${_home}/${_user}/printa4-"$(basename "$f")" --print - ssh ${_user}@${_server}.dm.unipi.it rm ${_home}/${_user}/printa4-"$(basename "$f")" + scp "$f" "${_user}@${_server}.dm.unipi.it:${_home}/${_user}/printa4-$(basename "$f")" + ssh -XY ${_user}@${_server}.dm.unipi.it okular "${_home}/${_user}/printa4-$(basename "$f")" --print + ssh ${_user}@${_server}.dm.unipi.it "rm \"${_home}/${_user}/printa4-$(basename "$f")\"" done else options="$1"; shift for f in "$@"; do - scp "$f" ${_user}@${_server}.dm.unipi.it:${_home}/${_user}/printa4-"$(basename "$f")" - ssh ${_user}@${_server}.dm.unipi.it lp $options ${_home}/${_user}/printa4-"$(basename "$f")" - ssh ${_user}@${_server}.dm.unipi.it rm ${_home}/${_user}/printa4-"$(basename "$f")" + scp "$f" "${_user}@${_server}.dm.unipi.it:${_home}/${_user}/printa4-$(basename "$f")" + ssh ${_user}@${_server}.dm.unipi.it lp $options "${_home}/${_user}/printa4-$(basename "$f")" + ssh ${_user}@${_server}.dm.unipi.it "rm \"${_home}/${_user}/printa4-$(basename "$f")\"" done fi }