|
|
@ -14,17 +14,17 @@ _user="minnocci"
|
|
|
|
|
|
|
|
|
|
|
|
main() {
|
|
|
|
main() {
|
|
|
|
if $NO_CLI; then
|
|
|
|
if $NO_CLI; then
|
|
|
|
for f in $@; do
|
|
|
|
for f in "$@"; do
|
|
|
|
scp $f ${_user}@ssh1.dm.unipi.it:/home/${_user}/printa4-$f
|
|
|
|
scp "$f" ${_user}@ssh1.dm.unipi.it:/home/${_user}/printa4-"'$(basename "$f")'"
|
|
|
|
ssh -XY ${_user}@ssh1.dm.unipi.it okular /home/${_user}/printa4-$f --print
|
|
|
|
ssh -XY ${_user}@ssh1.dm.unipi.it okular /home/${_user}/printa4-"'$(basename "$f")'" --print
|
|
|
|
ssh ${_user}@ssh1.dm.unipi.it rm /home/${_user}/printa4-$f
|
|
|
|
ssh ${_user}@ssh1.dm.unipi.it rm /home/${_user}/printa4-"'$(basename "$f")'"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
else
|
|
|
|
else
|
|
|
|
options="$1"; shift
|
|
|
|
options="$1"; shift
|
|
|
|
for f in $@; do
|
|
|
|
for f in "$@"; do
|
|
|
|
scp $f ${_user}@ssh1.dm.unipi.it:/home/${_user}/printa4-$f
|
|
|
|
scp "$f" ${_user}@ssh1.dm.unipi.it:/home/${_user}/printa4-"'$(basename "$f")'"
|
|
|
|
ssh ${_user}@ssh1.dm.unipi.it lp $options /home/${_user}/printa4-$f
|
|
|
|
ssh ${_user}@ssh1.dm.unipi.it lp $options /home/${_user}/printa4-"'$(basename "$f")'"
|
|
|
|
ssh ${_user}@ssh1.dm.unipi.it rm /home/${_user}/printa4-$f
|
|
|
|
ssh ${_user}@ssh1.dm.unipi.it rm /home/${_user}/printa4-"'$(basename "$f")'"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -65,7 +65,7 @@ error() {
|
|
|
|
if [ -z "$1" ] ; then
|
|
|
|
if [ -z "$1" ] ; then
|
|
|
|
error "Non hai specificato nessun file...\n"
|
|
|
|
error "Non hai specificato nessun file...\n"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
case $1 in
|
|
|
|
case "$1" in
|
|
|
|
-h|--help)
|
|
|
|
-h|--help)
|
|
|
|
usage ;;
|
|
|
|
usage ;;
|
|
|
|
-c|--cli)
|
|
|
|
-c|--cli)
|
|
|
|