2017-12-31 16:30:40 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
from=${1}
|
|
|
|
to=${2}
|
2018-03-15 15:55:25 +00:00
|
|
|
common=`printf '%s\n%s' "${from}" "${to}" | sed 'N;s/\(.*\).*\n\1.*$/\1/' | sed 's@/[^/]*$@/@'`
|
2017-12-31 16:30:40 +00:00
|
|
|
prefix=`printf '%s\n' ${from#$common} | sed 's@[^/][^/]*@..@g'`
|
|
|
|
printf '%s\n' "$prefix/${to#$common}"
|