summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xeasy_e17.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/easy_e17.sh b/easy_e17.sh
index 7cf1d7c..adab900 100755
--- a/easy_e17.sh
+++ b/easy_e17.sh
@@ -1004,7 +1004,7 @@ function find_local_path ()
name=$1
re_src_path=$(echo $src_path | sed 's/\//\\\//g')
path=$(find $src_path -maxdepth 5 -type d -name $name | sed -e "s/$re_src_path\///" | grep -v -E "^${src_path}$" | grep -v -E "$ignore_dirs_re" | \
- while read line; do echo `echo $line | wc -c` $line; done | sort -n | head -n 1 | cut -d " " -f 2)
+ while read line; do echo $(echo $line | grep -o '/' | wc -l) $line; done | sort -n | head -n 1 | cut -d " " -f 2)
if [ "$path" ]; then echo "$src_path/$path"; fi
}