From 6139d641df6eb67e4343ac8b3f5775933f7881ac Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 15 Feb 2022 22:35:52 -0300 Subject: [PATCH] Replace sed --- scripts/linkFiles.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/linkFiles.sh b/scripts/linkFiles.sh index 1590644..550513f 100755 --- a/scripts/linkFiles.sh +++ b/scripts/linkFiles.sh @@ -115,7 +115,7 @@ runDetachedScript() { shift; for srcFile in "$@"; do var=$(echo "$srcFile" | awk '{ sub(/.*dotfiles\/other\//, ""); print }') - varFolder=$(echo "$var" | sed "s/$(basename $var)//") + varFolder=${var//\/$(basename "$var")/} if [[ ! -d "/$varFolder" ]]; then mkdir -p "/$var" fi