blob: a1cd03d10b4e79e6dcbcf7a0076d7e65cf9653ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh -ex
dotest() {
src=$1
desti=$2
destdn=$3
n=$4
touch ./$src/src$n
touch ./$desti/desti$n
ln ./$desti/desti$n ./$destdn/destdn$n
mv ./$src/src$n ./$destdn/destdn$n
}
# srcdn=destdn=desti
dotest 'a' 'a' 'a' 1
# destdn=desti
dotest 'b' 'a' 'a' 2
# srcdn=destdn
dotest 'a' 'b' 'a' 3
# srcdn=desti
dotest 'a' 'a' 'b' 4
# all different
dotest 'a' 'b' 'c' 5
|