mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
8 lines
226 B
Bash
Executable File
8 lines
226 B
Bash
Executable File
#! /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}"
|