|
0
|
1 #!/bin/bash
|
|
|
2 # Fetch file(s) from Edinburgh desktop machine
|
|
|
3 # Paths should be absolute or relative to remote home dir
|
|
|
4 # Globbing works (but quote it on the way in to avoid local interpretation)
|
|
|
5 # To rename a single remote file do fromE remote -r local
|
|
|
6 echo xcp "$DESKTOP:" "$@"
|
|
|
7 xcp "$DESKTOP:" "$@"
|
|
|
8 exit $?
|
|
|
9
|
|
|
10 # Older version follows
|
|
|
11 ff=
|
|
|
12 dest=.
|
|
|
13 if [ "x$2" = "x" ]
|
|
|
14 then
|
|
|
15 ff=troutbeck.inf.ed.ac.uk:$1
|
|
|
16 else
|
|
|
17 while [ "x$2" != "x" ]
|
|
|
18 do
|
|
|
19 ff="$ff troutbeck.inf.ed.ac.uk:$1"
|
|
|
20 shift
|
|
|
21 done
|
|
|
22 dest=$1
|
|
|
23 fi
|
|
|
24 echo scp $ff $dest
|
|
|
25 scp $ff $dest
|