Displaying 1 result from an estimated 1 matches for "dstdepth".
2007 Jun 06
1
add inverse recursive feature or do a mkdir -p/install -D -d ?
...path please}"
dst="${2:?give a dst path please}"
src=$(echo -n "${src}" | sed -e 's,/$,,')
dst=$(echo -n "${dst}" | sed -e 's,/$,,')
srcdepth=$(echo -n "${src}" | sed -e 's,[^/],,g' | wc -c)
dstdepth=$(echo -n "${dst}" | sed -e 's,[^/],,g' | wc -c)
if [ $srcdepth -lt $dstdepth ]; then
maxdepth=$srcdepth;
else
maxdepth=$dstdepth;
fi
echo "${src} ${dst}"
for (( i=1; ${i} < ${maxdepth}; i=$(( ${i...