ZmnSCPxj
7 years ago
committed by
Christian Decker
2 changed files with 10 additions and 1 deletions
@ -0,0 +1,7 @@ |
|||
#! /bin/sh |
|||
|
|||
from=${1} |
|||
to=${2} |
|||
common=`printf '%s\0%s' "${from}" "${to}" | sed 's/\(.*\).*\x0\1.*/\1/' | sed 's@/[^/]*$@/@'` |
|||
prefix=`printf '%s\n' ${from#$common} | sed 's@[^/][^/]*@..@g'` |
|||
printf '%s\n' "$prefix/${to#$common}" |
Loading…
Reference in new issue