#!/bin/csh
# kopiert remote Files per scp von einem Server
if ($#argv == 0) then
 echo "USAGE: $0 user host source [target]"
 exit
endif

set noglob
set port = 22
set user = $1
shift
set host = $1
shift
set source = "$1"
if ($#argv == 2) set target = "$2"
if ($host == "MySun") set port = 222
if ($?target) then
 scp -B -P ${port} -q "${user}@${host}:${source}" "${target}"
else
 scp -B -P ${port} -q "${user}@${host}:${source}" "${source}"
endif
unset noglob
