search for: pathdepth

Displaying 1 result from an estimated 1 matches for "pathdepth".

Did you mean: at_depth
2007 Jun 06
1
add inverse recursive feature or do a mkdir -p/install -D -d ?
...st2/toto1/toto2 CODE #!/bin/bash # rrsync.sh by Guy Baconniere usage="$0 <src> <dst>" src=${1:?$usage} dst=${2:?$usage} function crushedpath() { path="${1:?give a path please}" path=$(echo -n "${path}" | sed -e 's,/$,,') pathdepth=$(echo -n "${path}" | sed -e 's,[^/],,g' | wc -c) echo "${path}" for (( i=1; ${i} < ${pathdepth}; i=$(( ${i}+1 )) )); do fpath=$(( ${pathdepth} - ${i} )) subpath=$(echo -n "${path}" | cut -d "/" -f1-$...