我有这个:
for f in `(cd "$project_root/src" && find . -type f)`; do
full_src="$project_root/src/$f";
full_dist="$project_root/dist/$f";
echo "Full src: $full_src";
echo "Full dist: $full_dist";
done
我得到:
Full src: /Users/alex/codes/interos/interos-cli/src/./declarations.ts Full dist: /Users/alex/codes/interos/interos-cli/dist/./declarations.ts
我该如何解析文件路径,以便删除多余的./
?